From 65345e740fb415b32d8168f6a112913ba1bed617 Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Tue, 20 Jan 2026 13:37:31 +0000 Subject: [PATCH 01/14] Push changes to branch, expect a KGO change --- .../source/boundary_layer/kmkhz_9c.F90 | 5564 +++++++++-------- 1 file changed, 2825 insertions(+), 2739 deletions(-) diff --git a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 index 24008fac1..6f8e286c9 100644 --- a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 +++ b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 @@ -963,7 +963,7 @@ subroutine kmkhz_9c ( & ! z_uv at k=ntml+1 !Variables for cache-blocking -integer :: jj ! Block index +integer :: ii ! Block index integer(kind=jpim), parameter :: zhook_in = 0 integer(kind=jpim), parameter :: zhook_out = 1 @@ -1011,17 +1011,17 @@ subroutine kmkhz_9c ( & dz_disc_min = one_half * timestep * 1.0e-4_r_bl +j = 1 !Start OpenMP parallel region !$OMP PARALLEL DEFAULT(SHARED) & -!$OMP private (i, j, jj, k, kp, kl, km, i_wt, w_curv_nm, w_del_nm, w_curv, & +!$OMP private (i, ii, k, kp, kl, km, i_wt, w_curv_nm, w_del_nm, w_curv, & !$OMP r_d_eta, rho_dz, z_surf, sl_plume, qw_plume, q_liq_parc, q_liq_env, & !$OMP t_parc, q_vap_parc, t_dens_parc, t_dens_env, dpar_bydz, denv_bydz, & !$OMP z_rad_lim, k_rad_lim, dflw_inv, dfsw_inv, dfsw_top, svl_plume, & !$OMP svl_diff, monotonic_inv, svl_lapse, svl_lapse_base, & !$OMP quad_a, quad_bm, quad_c, dz_disc, dsvl_top, sl_lapse, qw_lapse, & !$OMP kp2, rht_k, rht_kp1, rht_kp2, interp, z_cbase ) - !----------------------------------------------------------------------- ! Index to subroutine KMKHZ9C @@ -1046,32 +1046,32 @@ subroutine kmkhz_9c ( & ! 1.1 Calculate Z_TOP (top of levels) and NTML from previous timestep !----------------------------------------------------------------------- !$OMP do SCHEDULE(STATIC) -do jj = pdims%j_start, pdims%j_end, bl_segment_size - do j = jj, min((jj+bl_segment_size)-1,pdims%j_end) - do i = pdims%i_start, pdims%i_end - ntml_prev(i,j) = 1 - end do +do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + !do i = pdims%i_start, pdims%i_end + ntml_prev(i,j) = 1 + !end do end do do k = 1, bl_levels-1 - do j = jj, min((jj+bl_segment_size)-1,pdims%j_end) - do i = pdims%i_start, pdims%i_end - z_top(i,j,k) = z_uv(i,j,k+1) - !------------------------------------------------------------ - !find NTML from previous TS (for accurate gradient adjustment - !of profiles - also note that NTML le BL_LEVELS-1) - !------------------------------------------------------------ - if ( zh_prev(i,j) >= z_uv(i,j,k+1) ) ntml_prev(i,j)=k - end do + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + !do i = pdims%i_start, pdims%i_end + z_top(i,j,k) = z_uv(i,j,k+1) + !------------------------------------------------------------ + !find NTML from previous TS (for accurate gradient adjustment + !of profiles - also note that NTML le BL_LEVELS-1) + !------------------------------------------------------------ + if ( zh_prev(i,j) >= z_uv(i,j,k+1) ) ntml_prev(i,j)=k + !end do end do end do k = bl_levels - do j = jj, min((jj+bl_segment_size)-1,pdims%j_end) - do i = pdims%i_start, pdims%i_end - z_top(i,j,k) = z_uv(i,j,k) + dzl(i,j,k) - end do + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + !do i = pdims%i_start, pdims%i_end + z_top(i,j,k) = z_uv(i,j,k) + dzl(i,j,k) + !end do end do -end do ! jj +end do ! ii !$OMP end do NOWAIT !----------------------------------------------------------------------- @@ -1080,12 +1080,12 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(STATIC) do k = 1, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - sl(i,j,k) = tl(i,j,k) + grcp * z_tq(i,j,k) - svl(i,j,k) = sl(i,j,k) * ( one + c_virtual*qw(i,j,k) ) - end do + !do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + sl(i,j,k) = tl(i,j,k) + grcp * z_tq(i,j,k) + svl(i,j,k) = sl(i,j,k) * ( one + c_virtual*qw(i,j,k) ) end do + !end do end do !$OMP end do NOWAIT @@ -1133,205 +1133,202 @@ subroutine kmkhz_9c ( & do k = 1, bl_levels km = max( 1, k-1 ) kp = min( bl_levels, k+1 ) -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - + !do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end ! If the Intel Compiler vs 12 is used, a job fails with segmentation ! fault when the following loop is vectorised. Thus the following ! directive stop vectorization of this loop when an Intel Compiler ! is used. Other compilers, for example Cray, should vectorise this - ! loop automatically. -#if defined (IFORT_VERSION) -!DIR$ NOVECTOR -#endif - - do i = pdims%i_start, pdims%i_end - w_grad(i,j,k) = (w(i,j,k)-w(i,j,km))*rdz(i,j,k) - w_curv_nm = w(i,j,kp)-2.0_r_bl*w(i,j,k)+w(i,j,km) - w_del_nm = w(i,j,kp)-w(i,j,km) - w_nonmono(i,j,k) = 0 - if ( abs(w_curv_nm) > abs(w_del_nm) ) w_nonmono(i,j,k) = 1 - sls_inc(i,j,k) = zero - qls_inc(i,j,k) = zero - end do ! i - end do ! j -!$OMP end do NOWAIT + ! loop automatically. +! #if defined (IFORT_VERSION) +! !DIR$ NOVECTOR +! #endif + w_grad(i,j,k) = (w(i,j,k)-w(i,j,km))*rdz(i,j,k) + w_curv_nm = w(i,j,kp)-2.0_r_bl*w(i,j,k)+w(i,j,km) + w_del_nm = w(i,j,kp)-w(i,j,km) + w_nonmono(i,j,k) = 0 + if ( abs(w_curv_nm) > abs(w_del_nm) ) w_nonmono(i,j,k) = 1 + sls_inc(i,j,k) = zero + qls_inc(i,j,k) = zero + end do ! i + !$OMP end do NOWAIT + !end do ! j end do ! k !$OMP BARRIER !$OMP do SCHEDULE(DYNAMIC) -do jj = pdims%j_start, pdims%j_end, bl_segment_size +do ii = pdims%i_start, pdims%i_end, bl_segment_size do k = 2, bl_levels-1 - do j = jj, min((jj+bl_segment_size)-1,pdims%j_end) - do i = pdims%i_start, pdims%i_end + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + !do i = pdims%i_start, pdims%i_end - if ( etadot(i,j,k) < - tiny(one) .and. & - etadot(i,j,k-1)< - tiny(one) ) then - !----------------------------------------------------------- - ! Only needed in subsidence regions - ! Also don't attempt coupling with dynamics if w has - ! significant vertical structure - !----------------------------------------------------------- - w_curv = (w_grad(i,j,k+1)-w_grad(i,j,k))/dzl(i,j,k) - if (abs(w_curv) > 1.0e-6_r_bl .and. w_nonmono(i,j,k) == 1) then - ! large curvature at a turning point - sls_inc(i,j,k-1) = zero ! need to make sure increments in - qls_inc(i,j,k-1) = zero ! level below are also set to zero - etadot(i,j,k-1) = zero - etadot(i,j,k) = zero - etadot(i,j,k+1) = zero - w(i,j,k-1) = zero - w(i,j,k) = zero - w(i,j,k+1) = zero - else - r_d_eta=1.0/(eta_theta_levels(k+1)-eta_theta_levels(k)) - sls_inc(i,j,k) = - etadot(i,j,k) * r_d_eta & - * ( sl(i,j,k+1) - sl(i,j,k) ) - qls_inc(i,j,k) = - etadot(i,j,k) * r_d_eta & - * ( qw(i,j,k+1) - qw(i,j,k) ) - end if ! safe to calculate increments - end if + if ( etadot(i,j,k) < - tiny(one) .and. & + etadot(i,j,k-1)< - tiny(one) ) then + !----------------------------------------------------------- + ! Only needed in subsidence regions + ! Also don't attempt coupling with dynamics if w has + ! significant vertical structure + !----------------------------------------------------------- + w_curv = (w_grad(i,j,k+1)-w_grad(i,j,k))/dzl(i,j,k) + if (abs(w_curv) > 1.0e-6_r_bl .and. w_nonmono(i,j,k) == 1) then + ! large curvature at a turning point + sls_inc(i,j,k-1) = zero ! need to make sure increments in + qls_inc(i,j,k-1) = zero ! level below are also set to zero + etadot(i,j,k-1) = zero + etadot(i,j,k) = zero + etadot(i,j,k+1) = zero + w(i,j,k-1) = zero + w(i,j,k) = zero + w(i,j,k+1) = zero + else + r_d_eta=1.0/(eta_theta_levels(k+1)-eta_theta_levels(k)) + sls_inc(i,j,k) = - etadot(i,j,k) * r_d_eta & + * ( sl(i,j,k+1) - sl(i,j,k) ) + qls_inc(i,j,k) = - etadot(i,j,k) * r_d_eta & + * ( qw(i,j,k+1) - qw(i,j,k) ) + end if ! safe to calculate increments + end if - end do + !end do end do end do -end do !jj +end do !ii !$OMP end do - +! do j = pdims%j_start, pdims%j_end ! Repeat for necessary parts of last 2 loops for water tracers if (l_wtrac) then !$OMP do SCHEDULE(STATIC) do i_wt = 1, n_wtrac do k = 1, bl_levels - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - qls_inc_wtrac(i,j,k,i_wt) = zero - end do ! i - end do ! j + do i = pdims%i_start, pdims%i_end + qls_inc_wtrac(i,j,k,i_wt) = zero + end do ! i end do ! k end do ! i_wt !$OMP end do + !end do ! j !$OMP do SCHEDULE(STATIC) - do jj = pdims%j_start, pdims%j_end, bl_segment_size + do ii = pdims%i_start, pdims%i_end, bl_segment_size do k = 2, bl_levels-1 - do j = jj, min((jj+bl_segment_size)-1,pdims%j_end) - do i = pdims%i_start, pdims%i_end - - if ( etadot(i,j,k) < - tiny(one) .and. & - etadot(i,j,k-1)< - tiny(one) ) then - !----------------------------------------------------------- - ! Only needed in subsidence regions - ! Also don't attempt coupling with dynamics if w has - ! significant vertical structure - !----------------------------------------------------------- - w_curv = (w_grad(i,j,k+1)-w_grad(i,j,k))/dzl(i,j,k) - if (abs(w_curv) > 1.0e-6_r_bl .and. w_nonmono(i,j,k) == 1) then - ! large curvature at a turning point - do i_wt = 1, n_wtrac - ! level below are also set to zero - qls_inc_wtrac(i,j,k-1,i_wt) = zero - end do - else - kp = k+1 - km = kp-1 - r_d_eta=one/(eta_theta_levels(kp)-eta_theta_levels(km)) - do i_wt = 1, n_wtrac - qls_inc_wtrac(i,j,k,i_wt) = - etadot(i,j,k) * r_d_eta & - * ( wtrac_bl(i_wt)%qw(i,j,kp) - wtrac_bl(i_wt)%qw(i,j,km) ) - end do - end if ! safe to calculate increments - end if - end do + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + !do i = pdims%i_start, pdims%i_end + + if ( etadot(i,j,k) < - tiny(one) .and. & + etadot(i,j,k-1)< - tiny(one) ) then + !----------------------------------------------------------- + ! Only needed in subsidence regions + ! Also don't attempt coupling with dynamics if w has + ! significant vertical structure + !----------------------------------------------------------- + w_curv = (w_grad(i,j,k+1)-w_grad(i,j,k))/dzl(i,j,k) + if (abs(w_curv) > 1.0e-6_r_bl .and. w_nonmono(i,j,k) == 1) then + ! large curvature at a turning point + do i_wt = 1, n_wtrac + ! level below are also set to zero + qls_inc_wtrac(i,j,k-1,i_wt) = zero + end do + else + kp = k+1 + km = kp-1 + r_d_eta=one/(eta_theta_levels(kp)-eta_theta_levels(km)) + do i_wt = 1, n_wtrac + qls_inc_wtrac(i,j,k,i_wt) = - etadot(i,j,k) * r_d_eta & + * ( wtrac_bl(i_wt)%qw(i,j,kp) - wtrac_bl(i_wt)%qw(i,j,km) ) + end do + end if ! safe to calculate increments + end if + !end do end do end do - end do !jj + end do !ii !$OMP end do end if ! l_wtrac +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - ! Non-turbulent fluxes are defined relative to the surface - ! so set them to zero at the surface - frad(i,j,1) = zero - frad_lw(i,j,1) = zero - frad_sw(i,j,1) = zero - fsubs(i,j,1,1) = zero ! for heat - fsubs(i,j,1,2) = zero ! for humidity - fmic(i,j,1,1) = zero ! for heat - fmic(i,j,1,2) = zero ! for humidity - - ! The two expressions are maintained as comment to highlight that - ! ft_nt and fq_net need to be updated if there are any eventual - ! changes in fmic/frad/fsubs at level 1. A job fails with - ! segmentation fault when the Intel compiler is used if the two - ! arrays are not set to 0.0 directly at level 1. - - !ft_nt(i,j,1) = frad(i,j,1) + fmic(i,j,1,1) + fsubs(i,j,1,1) - !fq_nt(i,j,1) = fmic(i,j,1,2) + fsubs(i,j,1,2) - - ft_nt(i,j,1) = zero - fq_nt(i,j,1) = zero +do i = pdims%i_start, pdims%i_end + ! Non-turbulent fluxes are defined relative to the surface + ! so set them to zero at the surface + frad(i,j,1) = zero + frad_lw(i,j,1) = zero + frad_sw(i,j,1) = zero + fsubs(i,j,1,1) = zero ! for heat + fsubs(i,j,1,2) = zero ! for humidity + fmic(i,j,1,1) = zero ! for heat + fmic(i,j,1,2) = zero ! for humidity + + ! The two expressions are maintained as comment to highlight that + ! ft_nt and fq_net need to be updated if there are any eventual + ! changes in fmic/frad/fsubs at level 1. A job fails with + ! segmentation fault when the Intel compiler is used if the two + ! arrays are not set to 0.0 directly at level 1. + + !ft_nt(i,j,1) = frad(i,j,1) + fmic(i,j,1,1) + fsubs(i,j,1,1) + !fq_nt(i,j,1) = fmic(i,j,1,2) + fsubs(i,j,1,2) + + ft_nt(i,j,1) = zero + fq_nt(i,j,1) = zero - end do end do !$OMP end do NOWAIT +!end do ! Repeat for necessary parts of last loop for water tracers + ! do j = pdims%j_start, pdims%j_end if (l_wtrac) then !$OMP do SCHEDULE(STATIC) do i_wt = 1, n_wtrac - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - ! Non-turbulent fluxes are defined relative to the surface - ! so set them to zero at the surface - fsubs_wtrac(i,j,1,i_wt) = zero - fmic_wtrac(i,j,1,i_wt) = zero - wtrac_bl(i_wt)%fq_nt(i,j,1) = zero - end do + do i = pdims%i_start, pdims%i_end + ! Non-turbulent fluxes are defined relative to the surface + ! so set them to zero at the surface + fsubs_wtrac(i,j,1,i_wt) = zero + fmic_wtrac(i,j,1,i_wt) = zero + wtrac_bl(i_wt)%fq_nt(i,j,1) = zero end do end do !$OMP end do end if +! end do ! This is the most computational expensive loop of the subroutine. The ! following parallelisation obtains lower times than the ones obtained -! by using the jj/bl_segment_size technique. While it would be +! by using the ii/bl_segment_size technique. While it would be ! possible to remove the "df_over_cp", "dfmic", and "dfsubs" arrays, ! without them some jobs lose bit-comparability with the Intel ! compiler. do k = 1, bl_levels kp = k+1 + !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - rho_dz = rho_mix_tq(i,j,k) * dzl(i,j,k) - - dflw_over_cp(i,j,k) = - rad_hr(i,j,1,k) * rho_dz - dfsw_over_cp(i,j,k) = - rad_hr(i,j,2,k) * rho_dz - df_over_cp(i,j,k) = dflw_over_cp(i,j,k) + dfsw_over_cp(i,j,k) - - dfmic(i,j,k,1) = - micro_tends(i,j,1,k) * rho_dz - dfmic(i,j,k,2) = - micro_tends(i,j,2,k) * rho_dz - dfsubs(i,j,k,1) = - sls_inc(i,j,k) * rho_dz - dfsubs(i,j,k,2) = - qls_inc(i,j,k) * rho_dz - - frad(i,j,kp) = frad(i,j,k) + df_over_cp(i,j,k) - frad_lw(i,j,kp)= frad_lw(i,j,k) + dflw_over_cp(i,j,k) - frad_sw(i,j,kp)= frad_sw(i,j,k) + dfsw_over_cp(i,j,k) - fsubs(i,j,kp,1)= fsubs(i,j,k,1) + dfsubs(i,j,k,1) - fsubs(i,j,kp,2)= fsubs(i,j,k,2) + dfsubs(i,j,k,2) - fmic(i,j,kp,1) = fmic(i,j,k,1) + dfmic(i,j,k,1) - fmic(i,j,kp,2) = fmic(i,j,k,2) + dfmic(i,j,k,2) - - ft_nt(i,j,kp) = frad(i,j,kp) + fmic(i,j,kp,1) + fsubs(i,j,kp,1) - fq_nt(i,j,kp) = fmic(i,j,kp,2) + fsubs(i,j,kp,2) - end do ! i - end do !j + do i = pdims%i_start, pdims%i_end + rho_dz = rho_mix_tq(i,j,k) * dzl(i,j,k) + + dflw_over_cp(i,j,k) = - rad_hr(i,j,1,k) * rho_dz + dfsw_over_cp(i,j,k) = - rad_hr(i,j,2,k) * rho_dz + df_over_cp(i,j,k) = dflw_over_cp(i,j,k) + dfsw_over_cp(i,j,k) + + dfmic(i,j,k,1) = - micro_tends(i,j,1,k) * rho_dz + dfmic(i,j,k,2) = - micro_tends(i,j,2,k) * rho_dz + dfsubs(i,j,k,1) = - sls_inc(i,j,k) * rho_dz + dfsubs(i,j,k,2) = - qls_inc(i,j,k) * rho_dz + + frad(i,j,kp) = frad(i,j,k) + df_over_cp(i,j,k) + frad_lw(i,j,kp)= frad_lw(i,j,k) + dflw_over_cp(i,j,k) + frad_sw(i,j,kp)= frad_sw(i,j,k) + dfsw_over_cp(i,j,k) + fsubs(i,j,kp,1)= fsubs(i,j,k,1) + dfsubs(i,j,k,1) + fsubs(i,j,kp,2)= fsubs(i,j,k,2) + dfsubs(i,j,k,2) + fmic(i,j,kp,1) = fmic(i,j,k,1) + dfmic(i,j,k,1) + fmic(i,j,kp,2) = fmic(i,j,k,2) + dfmic(i,j,k,2) + + ft_nt(i,j,kp) = frad(i,j,kp) + fmic(i,j,kp,1) + fsubs(i,j,kp,1) + fq_nt(i,j,kp) = fmic(i,j,kp,2) + fsubs(i,j,kp,2) + end do ! i !$OMP end do NOWAIT +!end do !j end do ! k ! Repeat necessary parts of last loop for water tracer @@ -1339,22 +1336,22 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(STATIC) do i_wt = 1, n_wtrac do k = 1, bl_levels - do j = pdims%j_start, pdims%j_end - kp = k+1 - do i = pdims%i_start, pdims%i_end - rho_dz = rho_mix_tq(i,j,k) * dzl(i,j,k) - dfmic_wtrac(i,j,k,i_wt) = & - - wtrac_as(i_wt)%micro_tends(i,j,k) * rho_dz - dfsubs_wtrac(i,j,k,i_wt) = - qls_inc_wtrac(i,j,k,i_wt) * rho_dz - - fsubs_wtrac(i,j,kp,i_wt)= & - fsubs_wtrac(i,j,k,i_wt) + dfsubs_wtrac(i,j,k,i_wt) - fmic_wtrac(i,j,kp,i_wt) = & - fmic_wtrac(i,j,k,i_wt) + dfmic_wtrac(i,j,k,i_wt) - wtrac_bl(i_wt)%fq_nt(i,j,kp) = & - fmic_wtrac(i,j,kp,i_wt) + fsubs_wtrac(i,j,kp,i_wt) - end do ! i - end do !j + !do j = pdims%j_start, pdims%j_end + kp = k+1 + do i = pdims%i_start, pdims%i_end + rho_dz = rho_mix_tq(i,j,k) * dzl(i,j,k) + dfmic_wtrac(i,j,k,i_wt) = & + - wtrac_as(i_wt)%micro_tends(i,j,k) * rho_dz + dfsubs_wtrac(i,j,k,i_wt) = - qls_inc_wtrac(i,j,k,i_wt) * rho_dz + + fsubs_wtrac(i,j,kp,i_wt)= & + fsubs_wtrac(i,j,k,i_wt) + dfsubs_wtrac(i,j,k,i_wt) + fmic_wtrac(i,j,kp,i_wt) = & + fmic_wtrac(i,j,k,i_wt) + dfmic_wtrac(i,j,k,i_wt) + wtrac_bl(i_wt)%fq_nt(i,j,kp) = & + fmic_wtrac(i,j,kp,i_wt) + fsubs_wtrac(i,j,kp,i_wt) + end do ! i + !end do !j end do ! k end do ! i_wt !$OMP end do NOWAIT @@ -1364,12 +1361,12 @@ subroutine kmkhz_9c ( & ! 1.4 Set UNSTABLE flag and find first level above surface layer !----------------------------------------------------------------------- !$OMP do SCHEDULE(DYNAMIC) -do jj = pdims%j_start, pdims%j_end, bl_segment_size - do j = jj, min(jj+bl_segment_size-1,pdims%j_end) - do i = pdims%i_start, pdims%i_end - unstable(i,j) = (fb_surf(i,j) > zero) - k_plume(i,j) = -1 - end do +do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min(ii+bl_segment_size-1,pdims%i_end) + !do i = pdims%i_start, pdims%i_end + unstable(i,j) = (fb_surf(i,j) > zero) + k_plume(i,j) = -1 + !end do end do !------------------------------------------------------------ @@ -1381,33 +1378,33 @@ subroutine kmkhz_9c ( & !------------------------------------------------------------ do k = 1, bl_levels-1 - do j = jj, min(jj+bl_segment_size-1,pdims%j_end) - do i = pdims%i_start, pdims%i_end + do i = ii, min(ii+bl_segment_size-1,pdims%i_end) + !do i = pdims%i_start, pdims%i_end - if ( unstable(i,j) ) then - - z_surf = 0.1_r_bl * zh_prev(i,j) - if ( z_tq(i,j,k) >= z_surf .and. k_plume(i,j) == -1 ) then - !reached z_surf - k_plume(i,j)=k - end if - if ( svl(i,j,k+1) >= svl(i,j,k) & - .and. k_plume(i,j) == -1 ) then - !reached inversion - k_plume(i,j)=k - end if + if ( unstable(i,j) ) then + z_surf = 0.1_r_bl * zh_prev(i,j) + if ( z_tq(i,j,k) >= z_surf .and. k_plume(i,j) == -1 ) then + !reached z_surf + k_plume(i,j)=k end if - end do + if ( svl(i,j,k+1) >= svl(i,j,k) & + .and. k_plume(i,j) == -1 ) then + !reached inversion + k_plume(i,j)=k + end if + + end if + !end do end do end do - do j = jj, min(jj+bl_segment_size-1,pdims%j_end) - do i = pdims%i_start, pdims%i_end - if (k_plume(i,j) == -1) k_plume(i,j)=1 - end do + do i = ii, min(ii+bl_segment_size-1,pdims%i_end) + !do i = pdims%i_start, pdims%i_end + if (k_plume(i,j) == -1) k_plume(i,j)=1 + !end do end do -end do ! jj +end do ! ii !$OMP end do NOWAIT !----------------------------------------------------------------------- @@ -1423,147 +1420,147 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- ! Initialise variables +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - cloud_base(i,j) = .false. - dsc(i,j) = .false. - coupled(i,j) = .false. - zhsc(i,j) = zero - ntdsc(i,j) = 0 - end do +do i = pdims%i_start, pdims%i_end + cloud_base(i,j) = .false. + dsc(i,j) = .false. + coupled(i,j) = .false. + zhsc(i,j) = zero + ntdsc(i,j) = 0 end do !$OMP end do +!end do if ( .not. sc_diag_opt == sc_diag_all_rh_max ) then ! Use svl-gradient method to diagnose the Sc-top level at non-cumulus points -!$OMP do SCHEDULE(DYNAMIC) - do jj = pdims%j_start, pdims%j_end, bl_segment_size + !$OMP do SCHEDULE(DYNAMIC) + do ii = pdims%i_start, pdims%i_end, bl_segment_size do k = 3, bl_levels-1 - do j = jj, min(jj+bl_segment_size-1,pdims%j_end) - do i = pdims%i_start, pdims%i_end - - !----------------------------------------------------------------- - !..Find cloud-base (where cloud here means CF > SC_CFTOL) - !----------------------------------------------------------------- - - if ( .not. cumulus(i,j) .and. & - z_tq(i,j,k) < zmaxb_for_dsc .and. & - k > ntml(i,j)+1 .and. cf(i,j,k) > sc_cftol & - .and. .not. cloud_base(i,j) & - ! not yet found cloud-base - .and. .not. dsc(i,j) ) then - ! not yet found a Sc layer - cloud_base(i,j) = .true. - end if - if ( cloud_base(i,j) .and. .not. dsc(i,j) .and. & - ! found cloud-base but not yet reached cloud-top - cf(i,j,k+1) < sc_cftol .and. & - z_tq(i,j,k) < zmaxt_for_dsc & - ! got to cloud-top below ZMAXT_FOR_DSC - ) then - cloud_base(i,j) = .false. ! reset CLOUD_BASE - !----------------------------------------------------------- - ! Look to see if at least top of cloud is well mixed: - ! test SVL-gradient for top 2 pairs of levels, in case - ! cloud top extends into the inversion. - ! Parcel descent in Section 4.0 below will determine depth - ! of mixed layer. - !---------------------------------------------------------- - if ( (svl(i,j,k)-svl(i,j,k-1)) & - /(z_tq(i,j,k)-z_tq(i,j,k-1)) & - < max_svl_grad ) then - dsc(i,j) = .true. - ntdsc(i,j) = k - zhsc(i,j) = z_uv(i,j,ntdsc(i,j)+1) - else if ( (svl(i,j,k-1)-svl(i,j,k-2)) & - /(z_tq(i,j,k-1)-z_tq(i,j,k-2)) & + do i = ii, min(ii+bl_segment_size-1,pdims%i_end) + !do i = pdims%i_start, pdims%i_end + + !----------------------------------------------------------------- + !..Find cloud-base (where cloud here means CF > SC_CFTOL) + !----------------------------------------------------------------- + + if ( .not. cumulus(i,j) .and. & + z_tq(i,j,k) < zmaxb_for_dsc .and. & + k > ntml(i,j)+1 .and. cf(i,j,k) > sc_cftol & + .and. .not. cloud_base(i,j) & + ! not yet found cloud-base + .and. .not. dsc(i,j) ) then + ! not yet found a Sc layer + cloud_base(i,j) = .true. + end if + if ( cloud_base(i,j) .and. .not. dsc(i,j) .and. & + ! found cloud-base but not yet reached cloud-top + cf(i,j,k+1) < sc_cftol .and. & + z_tq(i,j,k) < zmaxt_for_dsc & + ! got to cloud-top below ZMAXT_FOR_DSC + ) then + cloud_base(i,j) = .false. ! reset CLOUD_BASE + !----------------------------------------------------------- + ! Look to see if at least top of cloud is well mixed: + ! test SVL-gradient for top 2 pairs of levels, in case + ! cloud top extends into the inversion. + ! Parcel descent in Section 4.0 below will determine depth + ! of mixed layer. + !---------------------------------------------------------- + if ( (svl(i,j,k)-svl(i,j,k-1)) & + /(z_tq(i,j,k)-z_tq(i,j,k-1)) & < max_svl_grad ) then - !--------------------------------------------------------- - ! Well-mixed layer with top at k-1 or k. Check whether - ! there is a buoyancy inversion between levels k-1 and k - ! in a manner similar to the surface-driven plume: compare - ! the buoyancy gradient between levels K-1 and K for an - ! undiluted parcel and the environment - !--------------------------------------------------------- - sl_plume = tl(i,j,k-1) + grcp * z_tq(i,j,k-1) - qw_plume = qw(i,j,k-1) - ! ------------------------------------------------------------ - ! calculate parcel water by linearising qsat about the - ! environmental temperature. - ! ------------------------------------------------------------ - if (t(i,j,k) > tm) then - q_liq_parc = max( zero, ( qw_plume - qs(i,j,k) - & - dqsdt(i,j,k)* & - ( sl_plume-grcp*z_tq(i,j,k)-t(i,j,k) ) & - ) *a_qs(i,j,k) ) - q_liq_env = max( zero, ( qw(i,j,k) - qs(i,j,k) & - -dqsdt(i,j,k)*( tl(i,j,k) - t(i,j,k) ) & - ) *a_qs(i,j,k) ) - ! add on the difference in the environment's ql as - ! calculated by the partial condensation scheme (using - ! some RH_CRIT value) and what it would be if - ! RH_CRIT=1. This then imitates partial condensation in - ! the parcel. - q_liq_parc = q_liq_parc + qcl(i,j,k) + qcf(i,j,k) & - - q_liq_env - t_parc = sl_plume - grcp * z_tq(i,j,k) + & - lcrcp*q_liq_parc - else - q_liq_parc = max( zero, ( qw_plume - qs(i,j,k) - & - dqsdt(i,j,k)* & - ( sl_plume - grcp*z_tq(i,j,k)-t(i,j,k) ) & - ) *a_qs(i,j,k) ) - q_liq_env = max( zero, ( qw(i,j,k) - qs(i,j,k) & - -dqsdt(i,j,k)*( tl(i,j,k) - t(i,j,k) ) & - ) *a_qs(i,j,k) ) - ! add on difference in environment's ql between RH_CRIT and - ! RH_CRIT=1 - q_liq_parc = q_liq_parc + qcl(i,j,k) + qcf(i,j,k) & - - q_liq_env - t_parc = sl_plume - grcp * z_tq(i,j,k) + & - lsrcp*q_liq_parc - end if - q_vap_parc=qw_plume - q_liq_parc - - t_dens_parc=t_parc*(one+c_virtual*q_vap_parc-q_liq_parc) - t_dens_env=t(i,j,k)* & - (one+c_virtual*q(i,j,k)-qcl(i,j,k)-qcf(i,j,k)) - ! find vertical gradients in parcel and environment SVL - ! (using values from level below (K-1)) - env_svl_km1(i,j) = t(i,j,k-1) * ( one+c_virtual*q(i,j,k-1) & - -qcl(i,j,k-1)-qcf(i,j,k-1) ) + grcp*z_tq(i,j,k-1) - dpar_bydz=(t_dens_parc+grcp*z_tq(i,j,k)- & - env_svl_km1(i,j)) / & - (z_tq(i,j,k)-z_tq(i,j,k-1)) - denv_bydz=(t_dens_env+grcp*z_tq(i,j,k)- & - env_svl_km1(i,j))/ & - (z_tq(i,j,k)-z_tq(i,j,k-1)) - - if ( denv_bydz > 1.25_r_bl*dpar_bydz ) then - ! there is an inversion between levels K-1 and K - if ( k >= ntml(i,j)+3 ) then - ! if NTDSC == NTML+1 then assume we're looking - ! at the same inversion and so don't set DSC - ntdsc(i,j) = k-1 - zhsc(i,j) = z_uv(i,j,ntdsc(i,j)+1) - dsc(i,j) = .true. - end if - else - ! no inversion between levels K-1 and K, assume there - ! is an inversion between K and K+1 because of CF change - ntdsc(i,j) = k + dsc(i,j) = .true. + ntdsc(i,j) = k + zhsc(i,j) = z_uv(i,j,ntdsc(i,j)+1) + else if ( (svl(i,j,k-1)-svl(i,j,k-2)) & + /(z_tq(i,j,k-1)-z_tq(i,j,k-2)) & + < max_svl_grad ) then + !--------------------------------------------------------- + ! Well-mixed layer with top at k-1 or k. Check whether + ! there is a buoyancy inversion between levels k-1 and k + ! in a manner similar to the surface-driven plume: compare + ! the buoyancy gradient between levels K-1 and K for an + ! undiluted parcel and the environment + !--------------------------------------------------------- + sl_plume = tl(i,j,k-1) + grcp * z_tq(i,j,k-1) + qw_plume = qw(i,j,k-1) + ! ------------------------------------------------------------ + ! calculate parcel water by linearising qsat about the + ! environmental temperature. + ! ------------------------------------------------------------ + if (t(i,j,k) > tm) then + q_liq_parc = max( zero, ( qw_plume - qs(i,j,k) - & + dqsdt(i,j,k)* & + ( sl_plume-grcp*z_tq(i,j,k)-t(i,j,k) ) & + ) *a_qs(i,j,k) ) + q_liq_env = max( zero, ( qw(i,j,k) - qs(i,j,k) & + -dqsdt(i,j,k)*( tl(i,j,k) - t(i,j,k) ) & + ) *a_qs(i,j,k) ) + ! add on the difference in the environment's ql as + ! calculated by the partial condensation scheme (using + ! some RH_CRIT value) and what it would be if + ! RH_CRIT=1. This then imitates partial condensation in + ! the parcel. + q_liq_parc = q_liq_parc + qcl(i,j,k) + qcf(i,j,k) & + - q_liq_env + t_parc = sl_plume - grcp * z_tq(i,j,k) + & + lcrcp*q_liq_parc + else + q_liq_parc = max( zero, ( qw_plume - qs(i,j,k) - & + dqsdt(i,j,k)* & + ( sl_plume - grcp*z_tq(i,j,k)-t(i,j,k) ) & + ) *a_qs(i,j,k) ) + q_liq_env = max( zero, ( qw(i,j,k) - qs(i,j,k) & + -dqsdt(i,j,k)*( tl(i,j,k) - t(i,j,k) ) & + ) *a_qs(i,j,k) ) + ! add on difference in environment's ql between RH_CRIT and + ! RH_CRIT=1 + q_liq_parc = q_liq_parc + qcl(i,j,k) + qcf(i,j,k) & + - q_liq_env + t_parc = sl_plume - grcp * z_tq(i,j,k) + & + lsrcp*q_liq_parc + end if + q_vap_parc=qw_plume - q_liq_parc + + t_dens_parc=t_parc*(one+c_virtual*q_vap_parc-q_liq_parc) + t_dens_env=t(i,j,k)* & + (one+c_virtual*q(i,j,k)-qcl(i,j,k)-qcf(i,j,k)) + ! find vertical gradients in parcel and environment SVL + ! (using values from level below (K-1)) + env_svl_km1(i,j) = t(i,j,k-1) * ( one+c_virtual*q(i,j,k-1) & + -qcl(i,j,k-1)-qcf(i,j,k-1) ) + grcp*z_tq(i,j,k-1) + dpar_bydz=(t_dens_parc+grcp*z_tq(i,j,k)- & + env_svl_km1(i,j)) / & + (z_tq(i,j,k)-z_tq(i,j,k-1)) + denv_bydz=(t_dens_env+grcp*z_tq(i,j,k)- & + env_svl_km1(i,j))/ & + (z_tq(i,j,k)-z_tq(i,j,k-1)) + + if ( denv_bydz > 1.25_r_bl*dpar_bydz ) then + ! there is an inversion between levels K-1 and K + if ( k >= ntml(i,j)+3 ) then + ! if NTDSC == NTML+1 then assume we're looking + ! at the same inversion and so don't set DSC + ntdsc(i,j) = k-1 zhsc(i,j) = z_uv(i,j,ntdsc(i,j)+1) dsc(i,j) = .true. end if + else + ! no inversion between levels K-1 and K, assume there + ! is an inversion between K and K+1 because of CF change + ntdsc(i,j) = k + zhsc(i,j) = z_uv(i,j,ntdsc(i,j)+1) + dsc(i,j) = .true. end if end if - end do ! i + end if + !end do ! i end do ! j end do ! k - end do ! jj + end do ! ii !$OMP end do end if ! ( .not. sc_diag_opt == sc_diag_all_rh_max ) @@ -1581,141 +1578,143 @@ subroutine kmkhz_9c ( & ! Options that diagnose the Sc-top using the max total-water RH method... ! j-loop outermost to allow parallelisation (k-loop is sequential) -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - - do i = pdims%i_start, pdims%i_end - ! Initialise max RH in the column to zero - rht_max(i,j) = zero - end do - - do k = 1, bl_levels-1 - do i = pdims%i_start, pdims%i_end - if ( ( cumulus(i,j) .and. z_tq(i,j,k) > z_lcl(i,j) ) .or. & - ( sc_diag_opt == sc_diag_all_rh_max .and. (.not. cumulus(i,j)) & - .and. k > ntml(i,j)+1 ) ) then - ! If sc_diag_opt == sc_diag_cu_rh_max, only check cumulus points - ! at heights above the LCL. - ! If sc_diag_opt == sc_diag_all_rh_max, also check non-cumulus points - ! at heights above ntml+1. - - ! Find max of RHt = qw/qsat(Tl) in the column - ! (with extra check that value exceeds next level, to exclude - ! points at bl_levels-1 where a larger value occurs at bl_levels) - if ( cf(i,j,k) > sc_cftol .and. z_tq(i,j,k) < zmaxt_for_dsc ) then - if ( l_mr_physics ) then - call qsat_wat_mix( rht_k, tl(i,j,k), p(i,j,k) ) - call qsat_wat_mix( rht_kp1, tl(i,j,k+1), p(i,j,k+1) ) - else - call qsat_wat( rht_k, tl(i,j,k), p(i,j,k) ) - call qsat_wat( rht_kp1, tl(i,j,k+1), p(i,j,k+1) ) - end if - rht_k = qw(i,j,k) / rht_k - rht_kp1 = qw(i,j,k+1) / rht_kp1 - if ( rht_k > rht_max(i,j) .and. rht_k > rht_kp1 ) then - ntdsc(i,j) = k - rht_max(i,j) = rht_k - end if - end if ! ( cf(i,j,k) > sc_cftol etc ) - end if ! ( cumulus(i,j) etc ) - end do ! i = pdims%i_start, pdims%i_end - end do ! k = 1, bl_levels-1 - + !do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + ! Initialise max RH in the column to zero + rht_max(i,j) = zero + end do + !$OMP end do + do k = 1, bl_levels-1 + !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end - if ( ntdsc(i,j) > 0 .and. ( .not. dsc(i,j) ) ) then - ! If we just found ntdsc above (exclude points where dsc already - ! set true by finding ntdsc at non-cumulus points earlier under - ! the option sc_diag_opt = sc_diag_cu_rh_max)... - ! Set flag indicating we found a potential Sc layer top - dsc(i,j) = .true. - ! Now we assume that theta-level ntdsc is wholly within the Sc-layer, - ! and that theta-level ntdsc+1 is composed of air with RH of - ! level ntdsc up to height zhsc, and air with RH of level ntdsc+2 - ! above that height. Interpolate to find the height of zhsc - ! (fraction of theta-level ntdsc+1 that is below the Sc-top). - k = ntdsc(i,j) - kp2 = min(k+2, bl_levels) ! Avoid out-of-bounds when k = bl_levels-1 - rht_k = rht_max(i,j) - if ( l_mr_physics ) then - call qsat_wat_mix( rht_kp1, tl(i,j,k+1), p(i,j,k+1) ) - call qsat_wat_mix( rht_kp2, tl(i,j,kp2), p(i,j,kp2) ) - else - call qsat_wat( rht_kp1, tl(i,j,k+1), p(i,j,k+1) ) - call qsat_wat( rht_kp2, tl(i,j,kp2), p(i,j,kp2) ) - end if - rht_kp1 = qw(i,j,k+1) / rht_kp1 - rht_kp2 = qw(i,j,kp2) / rht_kp2 - if ( rht_kp2 < rht_kp1 ) then - ! RHt(k+1) lies between RHt(k) and RHt(k+2); compute fraction - interp = (rht_kp1 - rht_kp2) / (rht_k - rht_kp2) - zhsc(i,j) = (one-interp) * z_uv(i,j,k+1) & - + interp * z_uv(i,j,kp2) - else - ! Rht(k+1) is a local minimum; can't construct k+1 as a fraction - ! of properties from k and k+2. Set zhsc to what it would be in - ! the limit RHt(k+2) = RHt(k+1) - zhsc(i,j) = z_uv(i,j,k+1) - end if - end if ! ( ntdsc(i,j) > 0 ) - end do + if ( ( cumulus(i,j) .and. z_tq(i,j,k) > z_lcl(i,j) ) .or. & + ( sc_diag_opt == sc_diag_all_rh_max .and. (.not. cumulus(i,j)) & + .and. k > ntml(i,j)+1 ) ) then + ! If sc_diag_opt == sc_diag_cu_rh_max, only check cumulus points + ! at heights above the LCL. + ! If sc_diag_opt == sc_diag_all_rh_max, also check non-cumulus points + ! at heights above ntml+1. + + ! Find max of RHt = qw/qsat(Tl) in the column + ! (with extra check that value exceeds next level, to exclude + ! points at bl_levels-1 where a larger value occurs at bl_levels) + if ( cf(i,j,k) > sc_cftol .and. z_tq(i,j,k) < zmaxt_for_dsc ) then + if ( l_mr_physics ) then + call qsat_wat_mix( rht_k, tl(i,j,k), p(i,j,k) ) + call qsat_wat_mix( rht_kp1, tl(i,j,k+1), p(i,j,k+1) ) + else + call qsat_wat( rht_k, tl(i,j,k), p(i,j,k) ) + call qsat_wat( rht_kp1, tl(i,j,k+1), p(i,j,k+1) ) + end if + rht_k = qw(i,j,k) / rht_k + rht_kp1 = qw(i,j,k+1) / rht_kp1 + if ( rht_k > rht_max(i,j) .and. rht_k > rht_kp1 ) then + ntdsc(i,j) = k + rht_max(i,j) = rht_k + end if + end if ! ( cf(i,j,k) > sc_cftol etc ) + end if ! ( cumulus(i,j) etc ) + end do ! i = pdims%i_start, pdims%i_end + !$OMP end do + end do ! k = 1, bl_levels-1 + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + if ( ntdsc(i,j) > 0 .and. ( .not. dsc(i,j) ) ) then + ! If we just found ntdsc above (exclude points where dsc already + ! set true by finding ntdsc at non-cumulus points earlier under + ! the option sc_diag_opt = sc_diag_cu_rh_max)... + ! Set flag indicating we found a potential Sc layer top + dsc(i,j) = .true. + ! Now we assume that theta-level ntdsc is wholly within the Sc-layer, + ! and that theta-level ntdsc+1 is composed of air with RH of + ! level ntdsc up to height zhsc, and air with RH of level ntdsc+2 + ! above that height. Interpolate to find the height of zhsc + ! (fraction of theta-level ntdsc+1 that is below the Sc-top). + k = ntdsc(i,j) + kp2 = min(k+2, bl_levels) ! Avoid out-of-bounds when k = bl_levels-1 + rht_k = rht_max(i,j) + if ( l_mr_physics ) then + call qsat_wat_mix( rht_kp1, tl(i,j,k+1), p(i,j,k+1) ) + call qsat_wat_mix( rht_kp2, tl(i,j,kp2), p(i,j,kp2) ) + else + call qsat_wat( rht_kp1, tl(i,j,k+1), p(i,j,k+1) ) + call qsat_wat( rht_kp2, tl(i,j,kp2), p(i,j,kp2) ) + end if + rht_kp1 = qw(i,j,k+1) / rht_kp1 + rht_kp2 = qw(i,j,kp2) / rht_kp2 + if ( rht_kp2 < rht_kp1 ) then + ! RHt(k+1) lies between RHt(k) and RHt(k+2); compute fraction + interp = (rht_kp1 - rht_kp2) / (rht_k - rht_kp2) + zhsc(i,j) = (one-interp) * z_uv(i,j,k+1) & + + interp * z_uv(i,j,kp2) + else + ! Rht(k+1) is a local minimum; can't construct k+1 as a fraction + ! of properties from k and k+2. Set zhsc to what it would be in + ! the limit RHt(k+2) = RHt(k+1) + zhsc(i,j) = z_uv(i,j,k+1) + end if + end if ! ( ntdsc(i,j) > 0 ) end do -!$OMP end do NOWAIT + !$OMP end do NOWAIT + !end do else if ( sc_diag_opt == sc_diag_cu_relax ) then ! Diagnosed simply if significant cloud fraction at ZHPAR ! below the height threshold zmaxt_for_dsc + !do j = pdims%j_start, pdims%j_end -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - k = ntpar(i,j) - if ( cumulus(i,j) .and. k < bl_levels ) then - ! cumulus layer within BL_LEVELS - if ( z_tq(i,j,k) < zmaxt_for_dsc .and. & - ! cloud top below zmaxt_for_dsc - ( max( cf(i,j,k-1),cf(i,j,k),cf(i,j,k+1) ) > sc_cftol ) & - ! cloud-top sufficiently cloudy - ) then - dsc(i,j) = .true. - zhsc(i,j) = zhpar(i,j) - ntdsc(i,j)= ntpar(i,j) - end if + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + k = ntpar(i,j) + if ( cumulus(i,j) .and. k < bl_levels ) then + ! cumulus layer within BL_LEVELS + if ( z_tq(i,j,k) < zmaxt_for_dsc .and. & + ! cloud top below zmaxt_for_dsc + ( max( cf(i,j,k-1),cf(i,j,k),cf(i,j,k+1) ) > sc_cftol ) & + ! cloud-top sufficiently cloudy + ) then + dsc(i,j) = .true. + zhsc(i,j) = zhpar(i,j) + ntdsc(i,j)= ntpar(i,j) end if - end do + end if end do -!$OMP end do NOWAIT + !$OMP end do NOWAIT +!end do else if ( sc_diag_opt == sc_diag_orig ) then ! Original code, only diagnosed if shallow cu or not l_param_conv +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( (l_param_conv .and. & - l_shallow(i,j) .and. ntpar(i,j) < bl_levels ) & - ! shallow cumulus layer within BL_LEVELS - .or. (.not. l_param_conv .and. & - cumulus(i,j) .and. ntpar(i,j) < bl_levels ) ) then - ! cumulus layer and inversion found - if ( cf(i,j,ntpar(i,j)) > sc_cftol .or. & - cf(i,j,ntpar(i,j)+1) > sc_cftol ) then - ! cloudy - dsc(i,j) = .true. - zhsc(i,j) = zhpar(i,j) - ntdsc(i,j)= ntpar(i,j) - end if + do i = pdims%i_start, pdims%i_end + if ( (l_param_conv .and. & + l_shallow(i,j) .and. ntpar(i,j) < bl_levels ) & + ! shallow cumulus layer within BL_LEVELS + .or. (.not. l_param_conv .and. & + cumulus(i,j) .and. ntpar(i,j) < bl_levels ) ) then + ! cumulus layer and inversion found + if ( cf(i,j,ntpar(i,j)) > sc_cftol .or. & + cf(i,j,ntpar(i,j)+1) > sc_cftol ) then + ! cloudy + dsc(i,j) = .true. + zhsc(i,j) = zhpar(i,j) + ntdsc(i,j)= ntpar(i,j) end if - end do + end if end do -!$OMP end do NOWAIT + ! !$OMP end do NOWAIT + !$OMP end do +!end do end if ! test on sc_diag_opt if ( l_use_sml_dsc_fixes ) then ! Need to override "NOWAIT" on the previous blocks if going in here: -!$OMP BARRIER + !$OMP BARRIER ! If conv_diag has diagnosed a SML rising significantly above cloud-base, ! abort any DSC diagnosis higher-up. ! This is because at present, diagnosing an elevated DSC-layer prompts @@ -1727,26 +1726,26 @@ subroutine kmkhz_9c ( & ! The code currently only permits us to have one DSC-layer in the column, ! so if we have a cloudy boundary-layer, we need to reserve the one possible ! DSC for the case where the cloudy SML-top decouples to make a DSC. -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( unstable(i,j) .and. (.not. cumulus(i,j)) .and. dsc(i,j) ) then - if ( zh(i,j) - z_lcl(i,j) >= 400.0 ) then - ! Using cloud-layer depth >= 400m consistent with cumulus_test - ! in conv_diag, as this indicates that conv_diag was prevented - ! from diagnosing cumulus by its test on whether the qw profile - ! looks well-mixed. But it doesn't test on stability, so it can - ! give a very misleading diagnosis of a well-mixed cloudy layer. - ! In particular, it compares the cloud-layer qw gradient with the - ! sub-cloud-layer qw gradient, giving a well-mixed diagnosis if - ! they are similar even if both are large! - dsc(i,j) = .false. - ntdsc(i,j) = 0 - end if +! do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + if ( unstable(i,j) .and. (.not. cumulus(i,j)) .and. dsc(i,j) ) then + if ( zh(i,j) - z_lcl(i,j) >= 400.0 ) then + ! Using cloud-layer depth >= 400m consistent with cumulus_test + ! in conv_diag, as this indicates that conv_diag was prevented + ! from diagnosing cumulus by its test on whether the qw profile + ! looks well-mixed. But it doesn't test on stability, so it can + ! give a very misleading diagnosis of a well-mixed cloudy layer. + ! In particular, it compares the cloud-layer qw gradient with the + ! sub-cloud-layer qw gradient, giving a well-mixed diagnosis if + ! they are similar even if both are large! + dsc(i,j) = .false. + ntdsc(i,j) = 0 end if - end do + end if end do -!$OMP end do NOWAIT + !$OMP end do NOWAIT +! end do end if ! ( l_use_sml_dsc_fixes ) !----------------------------------------------------------------------- @@ -1756,141 +1755,143 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- ! Initialise variables !------------------------------ - +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - k_cloud_dsct(i,j) = 0 - df_dsct_over_cp(i,j) = zero - df_inv_dsc(i,j) = zero - end do +do i = pdims%i_start, pdims%i_end + k_cloud_dsct(i,j) = 0 + df_dsct_over_cp(i,j) = zero + df_inv_dsc(i,j) = zero end do !$OMP end do +!end do if (l_new_kcloudtop) then !--------------------------------------------------------------------- ! improved method of finding the k_cloud_dsct, the top of the mixed ! layer as seen by radiation !--------------------------------------------------------------------- -!$OMP do SCHEDULE(DYNAMIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - !------------------------------------------------------------- - ! Find k_cloud_dsct as the equivalent to ntdsc (the top level - ! of the DSC) seen by radiation, which we take as the level two - ! levels below the lowest level with free tropospheric radiative - ! cooling. This is done by finding the level with maximum LW - ! cooling, below z_rad_lim and above the SML and 0.5*ZHSC - ! (ie, restrict search to `close' to ZHSC) - ! Necessary as radiation is not usually called every timestep. - !------------------------------------------------------------- - if ( dsc(i,j) .and. ntdsc(i,j)+2 <= bl_levels ) then - z_rad_lim = max( z_tq(i,j,ntdsc(i,j)+2)+0.1_r_bl, 1.2_r_bl*zhsc(i,j) ) - - k = ntml(i,j)+2 - do while (z_tq(i,j,k) < z_rad_lim .and. k < bl_levels) - if ( z_tq(i,j,k) > one_half*zhsc(i,j) & - .and. dflw_over_cp(i,j,k) > df_dsct_over_cp(i,j) ) then - k_cloud_dsct(i,j) = k - df_dsct_over_cp(i,j) = dflw_over_cp(i,j,k) - end if - k = k+1 - end do ! k - ! Set K_CLOUD_DSCT to the level below if DF in the level - ! above is less than 1.5 times the level above that - ! (implies K_CLOUD_DSCT+1 is typical of free trop so - ! K_CLOUD_DSCT must be inversion level, instead of ntdsc). - ! DF in level K_CLOUD_DSCT+1 is then included as DF_INV_DSC - ! (see below). - k = k_cloud_dsct(i,j) - if ( k > 1 .and. k < bl_levels -1 ) then - if (dflw_over_cp(i,j,k+1) < 1.5_r_bl*dflw_over_cp(i,j,k+2)) & - k_cloud_dsct(i,j) = k-1 - end if - end if ! DSC test separated out - - end do ! i - !----------------------------------------------------------------- - ! Find bottom grid-level (K_LEVEL) for cloud-top radiative flux - ! divergence: higher of base of LW radiatively cooled layer, - ! ZH and 0.5*ZHSC, since cooling must be in upper part of layer - ! in order to generate turbulence. - !----------------------------------------------------------------- - do i = pdims%i_start, pdims%i_end - k_level(i,j) = k_cloud_dsct(i,j) - if ( k_cloud_dsct(i,j) > 1 ) then - k_rad_lim = ntml(i,j)+1 - k=k_cloud_dsct(i,j)-1 - kl=max(1,k) ! only to avoid out-of-bounds compiler warning - do while ( k > k_rad_lim & - .and. dflw_over_cp(i,j,kl) > zero & - .and. z_tq(i,j,kl) > one_half*zhsc(i,j) ) - k_level(i,j) = k - k = k-1 - kl=max(1,k) - end do ! k - end if - end do ! i - end do ! j -!$OMP end do - -else - - ! original method of finding the k_cloud_dsct, the top of the mixed layer - ! as seen by radiation, found to be resolution dependent - -!$OMP do SCHEDULE(DYNAMIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end +!do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(DYNAMIC) + do i = pdims%i_start, pdims%i_end !------------------------------------------------------------- - ! Find the layer with the greatest LW radiative flux jump in - ! the upper half of the boundary layer and assume that this - ! marks the top of the DSC layer. + ! Find k_cloud_dsct as the equivalent to ntdsc (the top level + ! of the DSC) seen by radiation, which we take as the level two + ! levels below the lowest level with free tropospheric radiative + ! cooling. This is done by finding the level with maximum LW + ! cooling, below z_rad_lim and above the SML and 0.5*ZHSC + ! (ie, restrict search to `close' to ZHSC) ! Necessary as radiation is not usually called every timestep. !------------------------------------------------------------- - ! Limit the search to above the SML. - k_rad_lim = ntml(i,j)+2 + if ( dsc(i,j) .and. ntdsc(i,j)+2 <= bl_levels ) then + z_rad_lim = max( z_tq(i,j,ntdsc(i,j)+2)+0.1_r_bl, 1.2_r_bl*zhsc(i,j) ) - do k = max(1,k_rad_lim), min(bl_levels,ntdsc(i,j)+2) - - if ( dsc(i,j) .and. z_tq(i,j,k) > one_half*zhsc(i,j) & - .and. dflw_over_cp(i,j,k) > df_dsct_over_cp(i,j) ) then + k = ntml(i,j)+2 + do while (z_tq(i,j,k) < z_rad_lim .and. k < bl_levels) + if ( z_tq(i,j,k) > one_half*zhsc(i,j) & + .and. dflw_over_cp(i,j,k) > df_dsct_over_cp(i,j) ) then k_cloud_dsct(i,j) = k - ! Set K_CLOUD_DSCT to the level below if its DF is greater - ! than half the maximum. DF in level K_CLOUD_DSCT+1 is then - ! included as DF_INV_DSC below. - if (dflw_over_cp(i,j,k-1) > one_half*dflw_over_cp(i,j,k)) & - k_cloud_dsct(i,j) = k-1 df_dsct_over_cp(i,j) = dflw_over_cp(i,j,k) end if + k = k+1 + end do ! k + ! Set K_CLOUD_DSCT to the level below if DF in the level + ! above is less than 1.5 times the level above that + ! (implies K_CLOUD_DSCT+1 is typical of free trop so + ! K_CLOUD_DSCT must be inversion level, instead of ntdsc). + ! DF in level K_CLOUD_DSCT+1 is then included as DF_INV_DSC + ! (see below). + k = k_cloud_dsct(i,j) + if ( k > 1 .and. k < bl_levels -1 ) then + if (dflw_over_cp(i,j,k+1) < 1.5_r_bl*dflw_over_cp(i,j,k+2)) & + k_cloud_dsct(i,j) = k-1 + end if + end if ! DSC test separated out + end do ! i + !$OMP end do + !----------------------------------------------------------------- + ! Find bottom grid-level (K_LEVEL) for cloud-top radiative flux + ! divergence: higher of base of LW radiatively cooled layer, + ! ZH and 0.5*ZHSC, since cooling must be in upper part of layer + ! in order to generate turbulence. + !----------------------------------------------------------------- + !$OMP do SCHEDULE(DYNAMIC) + do i = pdims%i_start, pdims%i_end + k_level(i,j) = k_cloud_dsct(i,j) + if ( k_cloud_dsct(i,j) > 1 ) then + k_rad_lim = ntml(i,j)+1 + k=k_cloud_dsct(i,j)-1 + kl=max(1,k) ! only to avoid out-of-bounds compiler warning + do while ( k > k_rad_lim & + .and. dflw_over_cp(i,j,kl) > zero & + .and. z_tq(i,j,kl) > one_half*zhsc(i,j) ) + k_level(i,j) = k + k = k-1 + kl=max(1,k) end do ! k - end do ! i + end if + end do ! i + !$OMP end do + !end do ! j + !##### - !----------------------------------------------------------------- - ! Find bottom grid-level (K_LEVEL) for cloud-top radiative flux - ! divergence: higher of base of LW radiatively cooled layer, - ! ZH and 0.5*ZHSC, since cooling must be in upper part of layer - ! in order to generate turbulence. - !----------------------------------------------------------------- +else - do i = pdims%i_start, pdims%i_end - k_level(i,j) = k_cloud_dsct(i,j) - if ( k_cloud_dsct(i,j) > 1 ) then - k_rad_lim = ntml(i,j)+1 - k=k_cloud_dsct(i,j)-1 - kl=max(1,k) ! only to avoid out-of-bounds compiler warning - do while ( k > k_rad_lim & - .and. dflw_over_cp(i,j,kl) > zero & - .and. z_tq(i,j,kl) > one_half*zhsc(i,j) ) - k_level(i,j) = k - k = k-1 - kl=max(1,k) - end do ! k + ! original method of finding the k_cloud_dsct, the top of the mixed layer + ! as seen by radiation, found to be resolution dependent + + !do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(DYNAMIC) + do i = pdims%i_start, pdims%i_end + !------------------------------------------------------------- + ! Find the layer with the greatest LW radiative flux jump in + ! the upper half of the boundary layer and assume that this + ! marks the top of the DSC layer. + ! Necessary as radiation is not usually called every timestep. + !------------------------------------------------------------- + ! Limit the search to above the SML. + k_rad_lim = ntml(i,j)+2 + + do k = max(1,k_rad_lim), min(bl_levels,ntdsc(i,j)+2) + + if ( dsc(i,j) .and. z_tq(i,j,k) > one_half*zhsc(i,j) & + .and. dflw_over_cp(i,j,k) > df_dsct_over_cp(i,j) ) then + k_cloud_dsct(i,j) = k + ! Set K_CLOUD_DSCT to the level below if its DF is greater + ! than half the maximum. DF in level K_CLOUD_DSCT+1 is then + ! included as DF_INV_DSC below. + if (dflw_over_cp(i,j,k-1) > one_half*dflw_over_cp(i,j,k)) & + k_cloud_dsct(i,j) = k-1 + df_dsct_over_cp(i,j) = dflw_over_cp(i,j,k) end if - end do ! i - end do ! j -!$OMP end do + + end do ! k + end do ! i + !$OMP end do + !----------------------------------------------------------------- + ! Find bottom grid-level (K_LEVEL) for cloud-top radiative flux + ! divergence: higher of base of LW radiatively cooled layer, + ! ZH and 0.5*ZHSC, since cooling must be in upper part of layer + ! in order to generate turbulence. + !----------------------------------------------------------------- + !$OMP do SCHEDULE(DYNAMIC) + do i = pdims%i_start, pdims%i_end + k_level(i,j) = k_cloud_dsct(i,j) + if ( k_cloud_dsct(i,j) > 1 ) then + k_rad_lim = ntml(i,j)+1 + k=k_cloud_dsct(i,j)-1 + kl=max(1,k) ! only to avoid out-of-bounds compiler warning + do while ( k > k_rad_lim & + .and. dflw_over_cp(i,j,kl) > zero & + .and. z_tq(i,j,kl) > one_half*zhsc(i,j) ) + k_level(i,j) = k + k = k-1 + kl=max(1,k) + end do ! k + end if + end do ! i + !$OMP end do + !end do ! j end if ! test on l_new_kcloudtop @@ -1902,53 +1903,52 @@ subroutine kmkhz_9c ( & ! representative of clear-air rad divergence and so subtract this ! `clear-air' part from the grid-level divergence. !----------------------------------------------------------------- - +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - - if ( k_cloud_dsct(i,j) > 0 ) then - dflw_inv = zero - dfsw_inv = zero - if ( k_cloud_dsct(i,j) < bl_levels ) then - k = k_cloud_dsct(i,j)+1 - if ( k < bl_levels ) then - dflw_inv = dflw_over_cp(i,j,k) & - - dflw_over_cp(i,j,k+1) & - * dzl(i,j,k)/dzl(i,j,k+1) - dfsw_inv = dfsw_over_cp(i,j,k) & - - dfsw_over_cp(i,j,k+1) & - * dzl(i,j,k)/dzl(i,j,k+1) - else - dflw_inv = dflw_over_cp(i,j,k) - dfsw_inv = dfsw_over_cp(i,j,k) - end if - dflw_inv = max( dflw_inv, zero ) - dfsw_inv = min( dfsw_inv, zero ) +do i = pdims%i_start, pdims%i_end + + if ( k_cloud_dsct(i,j) > 0 ) then + dflw_inv = zero + dfsw_inv = zero + if ( k_cloud_dsct(i,j) < bl_levels ) then + k = k_cloud_dsct(i,j)+1 + if ( k < bl_levels ) then + dflw_inv = dflw_over_cp(i,j,k) & + - dflw_over_cp(i,j,k+1) & + * dzl(i,j,k)/dzl(i,j,k+1) + dfsw_inv = dfsw_over_cp(i,j,k) & + - dfsw_over_cp(i,j,k+1) & + * dzl(i,j,k)/dzl(i,j,k+1) + else + dflw_inv = dflw_over_cp(i,j,k) + dfsw_inv = dfsw_over_cp(i,j,k) end if - df_inv_dsc(i,j) = dflw_inv + dfsw_inv - - df_dsct_over_cp(i,j) = frad_lw(i,j,k_cloud_dsct(i,j)+1) & - - frad_lw(i,j,k_level(i,j)) & - + dflw_inv - - dfsw_top = frad_sw(i,j,k_cloud_dsct(i,j)+1) & - - frad_sw(i,j,k_level(i,j)) & - + dfsw_inv - - !----------------------------------------------------------- - ! Combine SW and LW cloud-top divergences into a net - ! divergence by estimating SW flux divergence at a given - ! LW divergence = DF_SW * (1-exp{-A*kappa_sw/kappa_lw}) - ! Empirically (from LEM data) a reasonable fit is found - ! with A small and (1-exp{-A*kappa_sw/kappa_lw}) = dfsw_frac - !----------------------------------------------------------- - df_dsct_over_cp(i,j) = max( zero, & - df_dsct_over_cp(i,j) + dfsw_frac * dfsw_top ) + dflw_inv = max( dflw_inv, zero ) + dfsw_inv = min( dfsw_inv, zero ) end if - end do + df_inv_dsc(i,j) = dflw_inv + dfsw_inv + + df_dsct_over_cp(i,j) = frad_lw(i,j,k_cloud_dsct(i,j)+1) & + - frad_lw(i,j,k_level(i,j)) & + + dflw_inv + + dfsw_top = frad_sw(i,j,k_cloud_dsct(i,j)+1) & + - frad_sw(i,j,k_level(i,j)) & + + dfsw_inv + + !----------------------------------------------------------- + ! Combine SW and LW cloud-top divergences into a net + ! divergence by estimating SW flux divergence at a given + ! LW divergence = DF_SW * (1-exp{-A*kappa_sw/kappa_lw}) + ! Empirically (from LEM data) a reasonable fit is found + ! with A small and (1-exp{-A*kappa_sw/kappa_lw}) = dfsw_frac + !----------------------------------------------------------- + df_dsct_over_cp(i,j) = max( zero, & + df_dsct_over_cp(i,j) + dfsw_frac * dfsw_top ) + end if end do !$OMP end do +!end do !----------------------------------------------------------------------- ! 2.4 Set NBDSC, the bottom level of the DSC layer. @@ -1967,86 +1967,85 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- !$OMP do SCHEDULE(DYNAMIC) -do jj = pdims%j_start, pdims%j_end, bl_segment_size - do j = jj, min(jj+bl_segment_size-1,pdims%j_end) - do i = pdims%i_start, pdims%i_end - nbdsc(i,j) = ntdsc(i,j)+1 - if (dsc(i,j)) then - ! The depth of the radiatively-cooled layer tends to be less - ! than O(50m) and so RAD_HR will be an underestimate of the - ! cooling tendency there. Compensate by multiplying by - ! DZL/50. (~4) Recall that DF_OVER_CP(I,j,K) = RAD_HR * - ! RHO_MIX_TQ * DZL Thus use cloud-top radiative forcing as - ! follows: - - k = ntdsc(i,j) - rho_dz = rho_mix_tq(i,j,k) * dzl(i,j,k) - svl_plume=svl(i,j,k-1) & - - ct_resid * dzl(i,j,k)*df_dsct_over_cp(i,j) / ( 50.0_r_bl*rho_dz ) - else - svl_plume=zero +do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min(ii+bl_segment_size-1,pdims%i_end) + !do i = pdims%i_start, pdims%i_end + nbdsc(i,j) = ntdsc(i,j)+1 + if (dsc(i,j)) then + ! The depth of the radiatively-cooled layer tends to be less + ! than O(50m) and so RAD_HR will be an underestimate of the + ! cooling tendency there. Compensate by multiplying by + ! DZL/50. (~4) Recall that DF_OVER_CP(I,j,K) = RAD_HR * + ! RHO_MIX_TQ * DZL Thus use cloud-top radiative forcing as + ! follows: + + k = ntdsc(i,j) + rho_dz = rho_mix_tq(i,j,k) * dzl(i,j,k) + svl_plume=svl(i,j,k-1) & + - ct_resid * dzl(i,j,k)*df_dsct_over_cp(i,j) / ( 50.0_r_bl*rho_dz ) + else + svl_plume=zero + end if + do k = min(bl_levels-1, ntdsc(i,j)-1), 1, -1 + if (svl_plume < svl(i,j,k) ) then + nbdsc(i,j) = k+1 ! marks lowest level within ML end if - do k = min(bl_levels-1, ntdsc(i,j)-1), 1, -1 - if (svl_plume < svl(i,j,k) ) then - nbdsc(i,j) = k+1 ! marks lowest level within ML - end if - end do ! k - end do ! i + end do ! k + !end do ! i end do ! j -end do !jj +end do !ii !$OMP end do !---------------------------------------------------------------------- ! 2.5 Tidy up variables associated with decoupled layer ! NOTE that NTDSC ge 3 if non-zero !---------------------------------------------------------------------- - +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - ! Note that ZHSC-Z_UV(NTML+2) may = 0, so this test comes first! - if (cumulus(i,j) .and. dsc(i,j)) & - nbdsc(i,j) = max( nbdsc(i,j), ntml(i,j)+2 ) - if ( ntdsc(i,j) >= 1 ) then - if ( nbdsc(i,j) < ntdsc(i,j)+1 ) then - if (sc_diag_opt==sc_diag_orig .or. sc_diag_opt==sc_diag_cu_relax) then - ! Initial zhsc is normally on rho-level ntdsc+1 - dscdepth(i,j) = z_uv(i,j,ntdsc(i,j)+1) - z_uv(i,j,nbdsc(i,j)) - else - ! Initial zhsc was interpolated between levels; use accurate zhsc - dscdepth(i,j) = zhsc(i,j) - z_uv(i,j,nbdsc(i,j)) - end if +do i = pdims%i_start, pdims%i_end + ! Note that ZHSC-Z_UV(NTML+2) may = 0, so this test comes first! + if (cumulus(i,j) .and. dsc(i,j)) & + nbdsc(i,j) = max( nbdsc(i,j), ntml(i,j)+2 ) + if ( ntdsc(i,j) >= 1 ) then + if ( nbdsc(i,j) < ntdsc(i,j)+1 ) then + if (sc_diag_opt==sc_diag_orig .or. sc_diag_opt==sc_diag_cu_relax) then + ! Initial zhsc is normally on rho-level ntdsc+1 + dscdepth(i,j) = z_uv(i,j,ntdsc(i,j)+1) - z_uv(i,j,nbdsc(i,j)) else + ! Initial zhsc was interpolated between levels; use accurate zhsc + dscdepth(i,j) = zhsc(i,j) - z_uv(i,j,nbdsc(i,j)) + end if + else + !---------------------------------------------------------- + ! Indicates a layer of zero depth + !---------------------------------------------------------- + if ( ( sc_diag_opt==sc_diag_orig .or. sc_diag_opt==sc_diag_cu_relax ) & + .and. ntdsc(i,j) == ntpar(i,j) ) then !---------------------------------------------------------- - ! Indicates a layer of zero depth + ! Indicates a Sc layer at the top of Cu: force mixing + ! over single layer. !---------------------------------------------------------- - if ( ( sc_diag_opt==sc_diag_orig .or. sc_diag_opt==sc_diag_cu_relax ) & - .and. ntdsc(i,j) == ntpar(i,j) ) then - !---------------------------------------------------------- - ! Indicates a Sc layer at the top of Cu: force mixing - ! over single layer. - !---------------------------------------------------------- - dscdepth(i,j) = dzl(i,j,ntdsc(i,j)) - else - dsc(i,j)=.false. - ntdsc(i,j)=0 - zhsc(i,j)=zero - df_dsct_over_cp(i,j) = zero - k_cloud_dsct(i,j) = 0 - df_inv_dsc(i,j) = zero - dscdepth(i,j) = zero - end if + dscdepth(i,j) = dzl(i,j,ntdsc(i,j)) + else + dsc(i,j)=.false. + ntdsc(i,j)=0 + zhsc(i,j)=zero + df_dsct_over_cp(i,j) = zero + k_cloud_dsct(i,j) = 0 + df_inv_dsc(i,j) = zero + dscdepth(i,j) = zero end if - else ! ntdsc == 0, just to make sure - dscdepth(i,j)=zero - dsc(i,j)=.false. - zhsc(i,j)=zero - df_dsct_over_cp(i,j) = zero - k_cloud_dsct(i,j) = 0 - df_inv_dsc(i,j) = zero end if - end do -end do + else ! ntdsc == 0, just to make sure + dscdepth(i,j)=zero + dsc(i,j)=.false. + zhsc(i,j)=zero + df_dsct_over_cp(i,j) = zero + k_cloud_dsct(i,j) = 0 + df_inv_dsc(i,j) = zero + end if +end do !$OMP end do NOWAIT +!end do !---------------------------------------------------------------------- !2.6 If decoupled cloud-layer found test to see if it is, in fact, @@ -2067,71 +2066,70 @@ subroutine kmkhz_9c ( & ! ON - taper off surface terms to zero for svl_diff between ! svl_coup and svl_coup_max; also ignore cumulus diags !------------------------------------------------------------- -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - coupled(i,j) = .false. - svl_diff_frac(i,j) = zero ! Fully coupled by default - if ( dsc(i,j) ) then - !------------------------------------------------------------- - ! Calculate cloud to surface mixed layer SVL difference - ! - avoid ntdsc as can be within base of inversion - !------------------------------------------------------------- - svl_diff = zero - if ( ntdsc(i,j) >= 2 ) & - svl_diff = svl(i,j,ntdsc(i,j)-1) - svl(i,j,ntml(i,j)) - if ( svl_diff < svl_coup_max ) then - coupled(i,j) = .true. - svl_diff_frac(i,j) = one - max( zero, & - (svl_diff-svl_coup)/(svl_coup_max-svl_coup) ) - ! to give 1 for svl_diff= 2 ) & + svl_diff = svl(i,j,ntdsc(i,j)-1) - svl(i,j,ntml(i,j)) + if ( svl_diff < svl_coup_max ) then + coupled(i,j) = .true. + svl_diff_frac(i,j) = one - max( zero, & + (svl_diff-svl_coup)/(svl_coup_max-svl_coup) ) + ! to give 1 for svl_diff one .and. ntml(i,j)+2 <= bl_levels ) then - if (zh(i,j)+dzh(i,j) > z_uv(i,j,ntml(i,j)+2) ) res_inv(i,j) = 1 - end if + sml_disc_inv(i,j) = 0 ! initialise flags to indicate whether a + dsc_disc_inv(i,j) = 0 ! discontinuous inversion is diagnosed + res_inv(i,j) = 0 ! Flag for whether inversion is resolved + if ( bl_res_inv /= off .and. .not. cumulus(i,j) .and. & + dzh(i,j) > one .and. ntml(i,j)+2 <= bl_levels ) then + if (zh(i,j)+dzh(i,j) > z_uv(i,j,ntml(i,j)+2) ) res_inv(i,j) = 1 + end if - !..First interpolate to find ZH + !..First interpolate to find ZH + + k = ntml(i,j) + !..by default, keep ZH at the half-level where it was diagnosed + !..initially and use grid-level jumps + + dsl_sml(i,j) = sl(i,j,k+1) - sl(i,j,k) + dqw_sml(i,j) = qw(i,j,k+1) - qw(i,j,k) + + if ( .not. cumulus(i,j) .and. .not. coupled(i,j) .and. & + res_inv(i,j) == 0 .and. k > 1 .and. k <= bl_levels-2 ) then + + ! Require SVL and SL to be monotonically increasing + ! and QW to be simply monotonic + monotonic_inv = ( svl(i,j,k+2) > svl(i,j,k+1) .and. & + svl(i,j,k+1) > svl(i,j,k) ) & + .and. ( sl(i,j,k+2) > sl(i,j,k+1) .and. & + sl(i,j,k+1) > sl(i,j,k) ) & + .and. ( ( qw(i,j,k+2) > qw(i,j,k+1) .and. & + qw(i,j,k+1) > qw(i,j,k) ) & + .or. ( qw(i,j,k+2) < qw(i,j,k+1) .and. & + qw(i,j,k+1) < qw(i,j,k) ) ) + + if ( monotonic_inv ) then + + if ( k <= bl_levels-3 ) then + ! need to test for K+1 to K+2 gradient in case profile is + ! concave (would mess up the inversion diagnosis so best + ! just to ignore lapse) + svl_lapse = max(zero, & + ( svl(i,j,k+3) - svl(i,j,k+2) ) * rdz(i,j,k+3) ) + if ( svl_lapse > & + ( svl(i,j,k+2) - svl(i,j,k+1) ) * rdz(i,j,k+2) ) & + svl_lapse = zero + else + svl_lapse = zero + end if + if ( k >= k_plume(i,j)+2 ) then + ! Use mean mixed layer gradient (if resolved) to allow + ! for stablisation by gradient-adjustment + ! Ignore level K in case inversion is dropping + svl_lapse_base = ( svl(i,j,k-1)-svl(i,j,k_plume(i,j)) )/ & + (z_tq(i,j,k-1)-z_tq(i,j,k_plume(i,j))) + svl_lapse_base = max( zero, svl_lapse_base ) + else + svl_lapse_base = zero + end if - k = ntml(i,j) - !..by default, keep ZH at the half-level where it was diagnosed - !..initially and use grid-level jumps + quad_a = one_half*( svl_lapse - svl_lapse_base ) + quad_bm = svl(i,j,k+2) - svl(i,j,k) & + - svl_lapse * ( z_tq(i,j,k+2)-z_uv(i,j,k+2) ) & + - svl_lapse_base * ( z_uv(i,j,k+1)-z_tq(i,j,k) + & + dzl(i,j,k+1) ) + quad_c = dzl(i,j,k+1)*( svl(i,j,k+1) - svl(i,j,k) - & + svl_lapse_base * ( & + z_uv(i,j,k+1)-z_tq(i,j,k) + one_half*dzl(i,j,k+1) ) ) + + if ( quad_bm > zero ) then + if ( quad_c <= zero) then + ! SVL extrapolated from K to K+1 is greater than + ! the level K+1 value - inversion needs to rise so + ! place it as high as possible + dz_disc = dz_disc_min + else if ( quad_bm*quad_bm >= 4.0_r_bl*quad_a*quad_c ) then + ! solve equation for DZ_DISC... + if ( abs(quad_a) >= rbl_eps ) then + ! ...quadratic if QUAD_A /= 0 + dz_disc = ( quad_bm - sqrt( quad_bm*quad_bm & + - 4.0_r_bl*quad_a*quad_c ) & + ) / (2.0_r_bl*quad_a) + else + ! ...linear if QUAD_A == 0 + dz_disc = quad_c / quad_bm + end if + else + dz_disc = 99999.9_r_bl ! large dummy value + end if + + if ( dz_disc > 0.9_r_bl * dzl(i,j,k+1) ) then + ! ZH diagnosed very close to or below Z_UV(K+1): + if ( svl(i,j,k)-svl(i,j,k-1) > zero) then + ! top of ML stably stratified so lower NTML but + ! set ZH only fractionally (DZ_DISC_MIN) + ! below the top of the inversion level. + ntml(i,j) = ntml(i,j) - 1 + k=ntml(i,j) + dz_disc = dz_disc_min + else + ! top of ML well-mixed so don't lower the inversion + ! level but set ZH just (DZ_DISC_MIN) above the + ! half-level to allow the inversion to subside if + ! necessary. + dz_disc = dzl(i,j,k+1) - dz_disc_min + end if + end if + + else + !.. ignoring lapse rates + dsvl_top = svl(i,j,k+2) - svl(i,j,k) + dz_disc = dzl(i,j,k+1) * & + (svl(i,j,k+1)-svl(i,j,k)) / dsvl_top + end if + + zh(i,j) = z_uv(i,j,k+2) - dz_disc + sml_disc_inv(i,j) = 1 ! set flag to indicate disc inv found + + !----------------------------------------------------------- + !..Calculate SML inversion discontinuous jumps of SL and QW + !----------------------------------------------------------- + ! Allow for lapse rate above inversion, if known + dz_disc = z_tq(i,j,k+2) - zh(i,j) + sl_lapse = zero + qw_lapse = zero + if ( k <= bl_levels-3 ) then + sl_lapse = max( zero, & + ( sl(i,j,k+3) - sl(i,j,k+2) )*rdz(i,j,k+3) ) + qw_lapse = min( zero, & + ( qw(i,j,k+3) - qw(i,j,k+2) )*rdz(i,j,k+3) ) + + if (l_wtrac) then ! Store method + if (qw_lapse >= 0.0) then + qw_lapse_zero_sml(i,j) = .true. + end if + end if + + end if + + !----------------- + ! First SL jump + !----------------- + ! Only reduce 2 level jump by at most half + dsl_sml(i,j) = sl(i,j,k+2) - sl(i,j,k) + dsl_sml(i,j) = dsl_sml(i,j) - & + min( one_half*dsl_sml(i,j), sl_lapse*dz_disc ) + !----------------- + ! Next QW jump + !----------------- + if ( qw(i,j,k+2) < qw(i,j,k+1) .and. & + qw(i,j,k+1) < qw(i,j,k) ) then + ! QW monotonically decreasing across inversion + ! Only allow for QW lapse rate if both it and the + ! 2 grid-level jump are negative (expected sign) + dqw_sml(i,j) = qw(i,j,k+2) - qw(i,j,k) + if (l_wtrac) dqw_sml_meth(i,j) = 1 + + if ( dqw_sml(i,j) < zero ) then + if (l_wtrac) then ! Store method + if (one_half*dqw_sml(i,j) > qw_lapse*dz_disc) then + dqw_sml_meth(i,j) = 2 + else + dqw_sml_meth(i,j) = 3 + end if + end if + dqw_sml(i,j) = dqw_sml(i,j) - & + max( one_half*dqw_sml(i,j), qw_lapse*dz_disc ) + end if + else if ( qw(i,j,k+2) > qw(i,j,k+1) .and. & + qw(i,j,k+1) > qw(i,j,k) ) then + ! QW monotonically increasing across inversion + ! Suggests something unusual is going so not clear how + ! to proceed, so currently leaving DQW as 2 level jump + dqw_sml(i,j) = qw(i,j,k+2) - qw(i,j,k) + if (l_wtrac) dqw_sml_meth(i,j) = 1 + end if + + end if ! Monotonic inversion + end if ! not cumulus and not at top of bl_levels + + !------------------------------------------------------------------- + !..Second interpolate to find ZHSC + !------------------------------------------------------------------- + if (l_wtrac) then + dqw_dsc_meth(i,j) = 0 + qw_lapse_zero_dsc(i,j) = .false. + end if - dsl_sml(i,j) = sl(i,j,k+1) - sl(i,j,k) - dqw_sml(i,j) = qw(i,j,k+1) - qw(i,j,k) - - if ( .not. cumulus(i,j) .and. .not. coupled(i,j) .and. & - res_inv(i,j) == 0 .and. k > 1 .and. k <= bl_levels-2 ) then - - ! Require SVL and SL to be monotonically increasing - ! and QW to be simply monotonic - monotonic_inv = ( svl(i,j,k+2) > svl(i,j,k+1) .and. & - svl(i,j,k+1) > svl(i,j,k) ) & - .and. ( sl(i,j,k+2) > sl(i,j,k+1) .and. & - sl(i,j,k+1) > sl(i,j,k) ) & - .and. ( ( qw(i,j,k+2) > qw(i,j,k+1) .and. & - qw(i,j,k+1) > qw(i,j,k) ) & - .or. ( qw(i,j,k+2) < qw(i,j,k+1) .and. & + if ( dsc(i,j) ) then + k = ntdsc(i,j) + !..by default, keep ZHSC at the half-level where it was diagnosed + !..initially and use grid-level jumps + dsl_dsc(i,j) = sl(i,j,k+1) - sl(i,j,k) + dqw_dsc(i,j) = qw(i,j,k+1) - qw(i,j,k) + + if ( k <= bl_levels-2 ) then + + ! Require SVL and SL to be monotonically increasing + ! and QW to be simply monotonic + monotonic_inv = ( svl(i,j,k+2) > svl(i,j,k+1) .and. & + svl(i,j,k+1) > svl(i,j,k) ) & + .and. ( sl(i,j,k+2) > sl(i,j,k+1) .and. & + sl(i,j,k+1) > sl(i,j,k) ) & + .and. ( ( qw(i,j,k+2) > qw(i,j,k+1) .and. & + qw(i,j,k+1) > qw(i,j,k) ) & + .or. ( qw(i,j,k+2) < qw(i,j,k+1) .and. & qw(i,j,k+1) < qw(i,j,k) ) ) if ( monotonic_inv ) then + if ( sc_diag_opt == sc_diag_cu_rh_max .or. & + sc_diag_opt == sc_diag_all_rh_max ) then + ! The initial zhsc can be between model-levels rather than exactly + ! on a rho-level. + ! Store height of base of DSC layer + z_cbase = zhsc(i,j) - dscdepth(i,j) + end if + if ( k <= bl_levels-3 ) then ! need to test for K+1 to K+2 gradient in case profile is ! concave (would mess up the inversion diagnosis so best - ! just to ignore lapse) - svl_lapse = max(zero, & - ( svl(i,j,k+3) - svl(i,j,k+2) ) * rdz(i,j,k+3) ) - if ( svl_lapse > & - ( svl(i,j,k+2) - svl(i,j,k+1) ) * rdz(i,j,k+2) ) & + ! just to ignore) + svl_lapse = max(zero, & + ( svl(i,j,k+3) - svl(i,j,k+2) )*rdz(i,j,k+3) ) + if ( svl_lapse > & + ( svl(i,j,k+2) - svl(i,j,k+1) )*rdz(i,j,k+2) ) & svl_lapse = zero else svl_lapse = zero end if - if ( k >= k_plume(i,j)+2 ) then - ! Use mean mixed layer gradient (if resolved) to allow - ! for stablisation by gradient-adjustment - ! Ignore level K in case inversion is dropping - svl_lapse_base = ( svl(i,j,k-1)-svl(i,j,k_plume(i,j)) )/ & - (z_tq(i,j,k-1)-z_tq(i,j,k_plume(i,j))) + if ( k >= nbdsc(i,j)+2 ) then + ! Use mean mixed layer gradient (if resolved) to allow + ! for stablisation by gradient-adjustment + ! Ignore level K in case inversion is dropping + svl_lapse_base = ( svl(i,j,k-1)-svl(i,j,nbdsc(i,j)) )/ & + (z_tq(i,j,k-1)-z_tq(i,j,nbdsc(i,j))) svl_lapse_base = max( zero, svl_lapse_base ) else svl_lapse_base = zero end if quad_a = one_half*( svl_lapse - svl_lapse_base ) - quad_bm = svl(i,j,k+2) - svl(i,j,k) & - - svl_lapse * ( z_tq(i,j,k+2)-z_uv(i,j,k+2) ) & - - svl_lapse_base * ( z_uv(i,j,k+1)-z_tq(i,j,k) + & + quad_bm = svl(i,j,k+2) - svl(i,j,k) & + - svl_lapse * ( z_tq(i,j,k+2)-z_uv(i,j,k+2) ) & + - svl_lapse_base * ( z_uv(i,j,k+1)-z_tq(i,j,k) + & dzl(i,j,k+1) ) - quad_c = dzl(i,j,k+1)*( svl(i,j,k+1) - svl(i,j,k) - & - svl_lapse_base * ( & + quad_c = dzl(i,j,k+1)*( svl(i,j,k+1) - svl(i,j,k) - & + svl_lapse_base * ( & z_uv(i,j,k+1)-z_tq(i,j,k) + one_half*dzl(i,j,k+1) ) ) if ( quad_bm > zero ) then if ( quad_c <= zero) then - ! SVL extrapolated from K to K+1 is greater than - ! the level K+1 value - inversion needs to rise so - ! place it as high as possible + ! SVL extrapolated from K to K+1 is greater than + ! the level K+1 value - inversion needs to rise dz_disc = dz_disc_min else if ( quad_bm*quad_bm >= 4.0_r_bl*quad_a*quad_c ) then - ! solve equation for DZ_DISC... - if ( abs(quad_a) >= rbl_eps ) then - ! ...quadratic if QUAD_A /= 0 - dz_disc = ( quad_bm - sqrt( quad_bm*quad_bm & - - 4.0_r_bl*quad_a*quad_c ) & + ! solve equation for DZ_DISC... + if ( abs(quad_a) >= rbl_eps ) then + ! ...quadratic if QUAD_A ne 0 + dz_disc = ( quad_bm - sqrt( quad_bm*quad_bm & + - 4.0_r_bl*quad_a*quad_c ) & ) / (2.0_r_bl*quad_a) else - ! ...linear if QUAD_A == 0 + ! ...linear if QUAD_A = 0 dz_disc = quad_c / quad_bm end if else @@ -2251,298 +2429,118 @@ subroutine kmkhz_9c ( & end if if ( dz_disc > 0.9_r_bl * dzl(i,j,k+1) ) then - ! ZH diagnosed very close to or below Z_UV(K+1): - if ( svl(i,j,k)-svl(i,j,k-1) > zero) then - ! top of ML stably stratified so lower NTML but - ! set ZH only fractionally (DZ_DISC_MIN) - ! below the top of the inversion level. - ntml(i,j) = ntml(i,j) - 1 - k=ntml(i,j) - dz_disc = dz_disc_min + if ( ntdsc(i,j) == 2 ) then + dz_disc = dzl(i,j,k+1) else - ! top of ML well-mixed so don't lower the inversion - ! level but set ZH just (DZ_DISC_MIN) above the - ! half-level to allow the inversion to subside if - ! necessary. - dz_disc = dzl(i,j,k+1) - dz_disc_min + ! ZHSC diagnosed very close to or below Z_UV(K+1): + if ( svl(i,j,k)-svl(i,j,k-1) > zero) then + ! top of ML stably stratified so lower NTDSC but + ! set ZHSC only fractionally (DZ_DISC_MIN) + ! below the top of the inversion level. + ntdsc(i,j) = ntdsc(i,j) - 1 + k=ntdsc(i,j) + dz_disc = dz_disc_min + dscdepth(i,j) = dscdepth(i,j) - dzl(i,j,k+1) + ! Note that all but DZ_DISC_MIN of this layer will + ! be added back on to DSCDEPTH a few lines below + else + ! top of ML well-mixed so don't lower the inversion + ! level but set ZHSC just (DZ_DISC_MIN) above the + ! half-level to allow the inversion to subside if + ! necessary. + dz_disc = dzl(i,j,k+1) - dz_disc_min + end if end if end if - else + else ! QUAD_BM le 0 !.. ignoring lapse rates dsvl_top = svl(i,j,k+2) - svl(i,j,k) - dz_disc = dzl(i,j,k+1) * & + dz_disc = dzl(i,j,k+1) * & (svl(i,j,k+1)-svl(i,j,k)) / dsvl_top end if - zh(i,j) = z_uv(i,j,k+2) - dz_disc - sml_disc_inv(i,j) = 1 ! set flag to indicate disc inv found + zhsc(i,j) = z_uv(i,j,k+2) - dz_disc + + if ( sc_diag_opt == sc_diag_cu_rh_max .or. & + sc_diag_opt == sc_diag_all_rh_max ) then + ! The initial zhsc can be between model-levels rather than exactly + ! on a rho-level. Assuming height of base of DSC layer stays the + ! same, set new depth based on updated DSC top height: + dscdepth(i,j) = zhsc(i,j) - z_cbase + else + ! The initial zhsc is always at rho-level ntdsc+1; + ! increment the DSC depth consistent with this: + dscdepth(i,j) = dscdepth(i,j) + zhsc(i,j) - z_uv(i,j,k+1) + end if + + dsc_disc_inv(i,j) = 1 ! set flag to indicate disc inv found !----------------------------------------------------------- - !..Calculate SML inversion discontinuous jumps of SL and QW + !..Calculate DSC inversion discontinuous jumps of SL and QW !----------------------------------------------------------- ! Allow for lapse rate above inversion, if known - dz_disc = z_tq(i,j,k+2) - zh(i,j) + dz_disc = z_tq(i,j,k+2) - zhsc(i,j) sl_lapse = zero qw_lapse = zero if ( k <= bl_levels-3 ) then - sl_lapse = max( zero, & - ( sl(i,j,k+3) - sl(i,j,k+2) )*rdz(i,j,k+3) ) - qw_lapse = min( zero, & - ( qw(i,j,k+3) - qw(i,j,k+2) )*rdz(i,j,k+3) ) + sl_lapse = max( zero, & + ( sl(i,j,k+3) - sl(i,j,k+2) )*rdz(i,j,k+3) ) + qw_lapse = min( zero, & + ( qw(i,j,k+3) - qw(i,j,k+2) )*rdz(i,j,k+3) ) if (l_wtrac) then ! Store method if (qw_lapse >= 0.0) then - qw_lapse_zero_sml(i,j) = .true. + qw_lapse_zero_dsc(i,j) = .true. end if end if end if - !----------------- - ! First SL jump - !----------------- - ! Only reduce 2 level jump by at most half - dsl_sml(i,j) = sl(i,j,k+2) - sl(i,j,k) - dsl_sml(i,j) = dsl_sml(i,j) - & - min( one_half*dsl_sml(i,j), sl_lapse*dz_disc ) - !----------------- - ! Next QW jump - !----------------- - if ( qw(i,j,k+2) < qw(i,j,k+1) .and. & - qw(i,j,k+1) < qw(i,j,k) ) then - ! QW monotonically decreasing across inversion - ! Only allow for QW lapse rate if both it and the - ! 2 grid-level jump are negative (expected sign) - dqw_sml(i,j) = qw(i,j,k+2) - qw(i,j,k) - if (l_wtrac) dqw_sml_meth(i,j) = 1 - - if ( dqw_sml(i,j) < zero ) then - if (l_wtrac) then ! Store method - if (one_half*dqw_sml(i,j) > qw_lapse*dz_disc) then - dqw_sml_meth(i,j) = 2 + !----------------- + ! First SL jump + !----------------- + ! Only reduce 2 level jump by at most half + dsl_dsc(i,j) = sl(i,j,k+2) - sl(i,j,k) + dsl_dsc(i,j) = dsl_dsc(i,j) - & + min( one_half*dsl_dsc(i,j), sl_lapse*dz_disc ) + !----------------- + ! Next QW jump + !----------------- + if ( qw(i,j,k+2) < qw(i,j,k+1) .and. & + qw(i,j,k+1) < qw(i,j,k) ) then + ! QW monotonically decreasing across inversion + ! Only allow for QW lapse rate if both it and the + ! 2 grid-level jump are negative (expected sign) + dqw_dsc(i,j) = qw(i,j,k+2) - qw(i,j,k) + if (l_wtrac) dqw_dsc_meth(i,j) = 1 + + if ( dqw_dsc(i,j) < zero ) then + if (l_wtrac) then ! Store method + if ( one_half*dqw_dsc(i,j) > qw_lapse*dz_disc ) then + dqw_dsc_meth(i,j) = 2 else - dqw_sml_meth(i,j) = 3 + dqw_dsc_meth(i,j) = 3 end if end if - dqw_sml(i,j) = dqw_sml(i,j) - & - max( one_half*dqw_sml(i,j), qw_lapse*dz_disc ) + dqw_dsc(i,j) = dqw_dsc(i,j) - & + max( one_half*dqw_dsc(i,j), qw_lapse*dz_disc ) end if - else if ( qw(i,j,k+2) > qw(i,j,k+1) .and. & + else if ( qw(i,j,k+2) > qw(i,j,k+1) .and. & qw(i,j,k+1) > qw(i,j,k) ) then - ! QW monotonically increasing across inversion - ! Suggests something unusual is going so not clear how - ! to proceed, so currently leaving DQW as 2 level jump - dqw_sml(i,j) = qw(i,j,k+2) - qw(i,j,k) - if (l_wtrac) dqw_sml_meth(i,j) = 1 + ! QW monotonically increasing across inversion + ! Suggests something unusual is going so not clear how + ! to proceed, so currently leaving DQW as 2 level jump + dqw_dsc(i,j) = qw(i,j,k+2) - qw(i,j,k) + if (l_wtrac) dqw_dsc_meth(i,j) = 1 end if - end if ! Monotonic inversion - end if ! not cumulus and not at top of bl_levels - - !------------------------------------------------------------------- - !..Second interpolate to find ZHSC - !------------------------------------------------------------------- - if (l_wtrac) then - dqw_dsc_meth(i,j) = 0 - qw_lapse_zero_dsc(i,j) = .false. - end if - - if ( dsc(i,j) ) then - k = ntdsc(i,j) - !..by default, keep ZHSC at the half-level where it was diagnosed - !..initially and use grid-level jumps - dsl_dsc(i,j) = sl(i,j,k+1) - sl(i,j,k) - dqw_dsc(i,j) = qw(i,j,k+1) - qw(i,j,k) - - if ( k <= bl_levels-2 ) then - - ! Require SVL and SL to be monotonically increasing - ! and QW to be simply monotonic - monotonic_inv = ( svl(i,j,k+2) > svl(i,j,k+1) .and. & - svl(i,j,k+1) > svl(i,j,k) ) & - .and. ( sl(i,j,k+2) > sl(i,j,k+1) .and. & - sl(i,j,k+1) > sl(i,j,k) ) & - .and. ( ( qw(i,j,k+2) > qw(i,j,k+1) .and. & - qw(i,j,k+1) > qw(i,j,k) ) & - .or. ( qw(i,j,k+2) < qw(i,j,k+1) .and. & - qw(i,j,k+1) < qw(i,j,k) ) ) - - if ( monotonic_inv ) then - - if ( sc_diag_opt == sc_diag_cu_rh_max .or. & - sc_diag_opt == sc_diag_all_rh_max ) then - ! The initial zhsc can be between model-levels rather than exactly - ! on a rho-level. - ! Store height of base of DSC layer - z_cbase = zhsc(i,j) - dscdepth(i,j) - end if - - if ( k <= bl_levels-3 ) then - ! need to test for K+1 to K+2 gradient in case profile is - ! concave (would mess up the inversion diagnosis so best - ! just to ignore) - svl_lapse = max(zero, & - ( svl(i,j,k+3) - svl(i,j,k+2) )*rdz(i,j,k+3) ) - if ( svl_lapse > & - ( svl(i,j,k+2) - svl(i,j,k+1) )*rdz(i,j,k+2) ) & - svl_lapse = zero - else - svl_lapse = zero - end if - if ( k >= nbdsc(i,j)+2 ) then - ! Use mean mixed layer gradient (if resolved) to allow - ! for stablisation by gradient-adjustment - ! Ignore level K in case inversion is dropping - svl_lapse_base = ( svl(i,j,k-1)-svl(i,j,nbdsc(i,j)) )/ & - (z_tq(i,j,k-1)-z_tq(i,j,nbdsc(i,j))) - svl_lapse_base = max( zero, svl_lapse_base ) - else - svl_lapse_base = zero - end if - - quad_a = one_half*( svl_lapse - svl_lapse_base ) - quad_bm = svl(i,j,k+2) - svl(i,j,k) & - - svl_lapse * ( z_tq(i,j,k+2)-z_uv(i,j,k+2) ) & - - svl_lapse_base * ( z_uv(i,j,k+1)-z_tq(i,j,k) + & - dzl(i,j,k+1) ) - quad_c = dzl(i,j,k+1)*( svl(i,j,k+1) - svl(i,j,k) - & - svl_lapse_base * ( & - z_uv(i,j,k+1)-z_tq(i,j,k) + one_half*dzl(i,j,k+1) ) ) - - if ( quad_bm > zero ) then - if ( quad_c <= zero) then - ! SVL extrapolated from K to K+1 is greater than - ! the level K+1 value - inversion needs to rise - dz_disc = dz_disc_min - else if ( quad_bm*quad_bm >= 4.0_r_bl*quad_a*quad_c ) then - ! solve equation for DZ_DISC... - if ( abs(quad_a) >= rbl_eps ) then - ! ...quadratic if QUAD_A ne 0 - dz_disc = ( quad_bm - sqrt( quad_bm*quad_bm & - - 4.0_r_bl*quad_a*quad_c ) & - ) / (2.0_r_bl*quad_a) - else - ! ...linear if QUAD_A = 0 - dz_disc = quad_c / quad_bm - end if - else - dz_disc = 99999.9_r_bl ! large dummy value - end if - - if ( dz_disc > 0.9_r_bl * dzl(i,j,k+1) ) then - if ( ntdsc(i,j) == 2 ) then - dz_disc = dzl(i,j,k+1) - else - ! ZHSC diagnosed very close to or below Z_UV(K+1): - if ( svl(i,j,k)-svl(i,j,k-1) > zero) then - ! top of ML stably stratified so lower NTDSC but - ! set ZHSC only fractionally (DZ_DISC_MIN) - ! below the top of the inversion level. - ntdsc(i,j) = ntdsc(i,j) - 1 - k=ntdsc(i,j) - dz_disc = dz_disc_min - dscdepth(i,j) = dscdepth(i,j) - dzl(i,j,k+1) - ! Note that all but DZ_DISC_MIN of this layer will - ! be added back on to DSCDEPTH a few lines below - else - ! top of ML well-mixed so don't lower the inversion - ! level but set ZHSC just (DZ_DISC_MIN) above the - ! half-level to allow the inversion to subside if - ! necessary. - dz_disc = dzl(i,j,k+1) - dz_disc_min - end if - end if - end if - - else ! QUAD_BM le 0 - !.. ignoring lapse rates - dsvl_top = svl(i,j,k+2) - svl(i,j,k) - dz_disc = dzl(i,j,k+1) * & - (svl(i,j,k+1)-svl(i,j,k)) / dsvl_top - end if - - zhsc(i,j) = z_uv(i,j,k+2) - dz_disc - - if ( sc_diag_opt == sc_diag_cu_rh_max .or. & - sc_diag_opt == sc_diag_all_rh_max ) then - ! The initial zhsc can be between model-levels rather than exactly - ! on a rho-level. Assuming height of base of DSC layer stays the - ! same, set new depth based on updated DSC top height: - dscdepth(i,j) = zhsc(i,j) - z_cbase - else - ! The initial zhsc is always at rho-level ntdsc+1; - ! increment the DSC depth consistent with this: - dscdepth(i,j) = dscdepth(i,j) + zhsc(i,j) - z_uv(i,j,k+1) - end if - - dsc_disc_inv(i,j) = 1 ! set flag to indicate disc inv found - - !----------------------------------------------------------- - !..Calculate DSC inversion discontinuous jumps of SL and QW - !----------------------------------------------------------- - ! Allow for lapse rate above inversion, if known - dz_disc = z_tq(i,j,k+2) - zhsc(i,j) - sl_lapse = zero - qw_lapse = zero - if ( k <= bl_levels-3 ) then - sl_lapse = max( zero, & - ( sl(i,j,k+3) - sl(i,j,k+2) )*rdz(i,j,k+3) ) - qw_lapse = min( zero, & - ( qw(i,j,k+3) - qw(i,j,k+2) )*rdz(i,j,k+3) ) - - if (l_wtrac) then ! Store method - if (qw_lapse >= 0.0) then - qw_lapse_zero_dsc(i,j) = .true. - end if - end if - - end if - - !----------------- - ! First SL jump - !----------------- - ! Only reduce 2 level jump by at most half - dsl_dsc(i,j) = sl(i,j,k+2) - sl(i,j,k) - dsl_dsc(i,j) = dsl_dsc(i,j) - & - min( one_half*dsl_dsc(i,j), sl_lapse*dz_disc ) - !----------------- - ! Next QW jump - !----------------- - if ( qw(i,j,k+2) < qw(i,j,k+1) .and. & - qw(i,j,k+1) < qw(i,j,k) ) then - ! QW monotonically decreasing across inversion - ! Only allow for QW lapse rate if both it and the - ! 2 grid-level jump are negative (expected sign) - dqw_dsc(i,j) = qw(i,j,k+2) - qw(i,j,k) - if (l_wtrac) dqw_dsc_meth(i,j) = 1 - - if ( dqw_dsc(i,j) < zero ) then - if (l_wtrac) then ! Store method - if ( one_half*dqw_dsc(i,j) > qw_lapse*dz_disc ) then - dqw_dsc_meth(i,j) = 2 - else - dqw_dsc_meth(i,j) = 3 - end if - end if - dqw_dsc(i,j) = dqw_dsc(i,j) - & - max( one_half*dqw_dsc(i,j), qw_lapse*dz_disc ) - end if - else if ( qw(i,j,k+2) > qw(i,j,k+1) .and. & - qw(i,j,k+1) > qw(i,j,k) ) then - ! QW monotonically increasing across inversion - ! Suggests something unusual is going so not clear how - ! to proceed, so currently leaving DQW as 2 level jump - dqw_dsc(i,j) = qw(i,j,k+2) - qw(i,j,k) - if (l_wtrac) dqw_dsc_meth(i,j) = 1 - end if - - end if ! monotonic inversion - end if ! test on K lt BL_LEVELS-2 - end if ! test on DSC - end do + end if ! monotonic inversion + end if ! test on K lt BL_LEVELS-2 + end if ! test on DSC end do !$OMP end do +!end do !$OMP end PARALLEL @@ -2590,70 +2588,71 @@ subroutine kmkhz_9c ( & ! 4.1 Calculate gradient adjustment terms !----------------------------------------------------------------------- +!do j = pdims%j_start, pdims%j_end !$OMP PARALLEL DEFAULT(SHARED) & -!$OMP private (i, j, jj, i_wt, k, kl, km, kp, kp2, kmax, wstar3, c_ws, w_m, & +!$OMP private (i, ii, i_wt, k, kl, km, kp, kp2, kmax, wstar3, c_ws, w_m, & !$OMP pr_neut, w_h, k_cff, virt_factor, z_cbase , zdsc_cbase, dsl_ga, & !$OMP dqw_ga, cfl_ml, cff_ml, dqw, dsl, dqcl, dqcf, db_disc, cu_depth_fac, & !$OMP k_rad_lim, z_rad_lim ,dfsw_inv, dflw_inv, dfsw_top, dsldz, cf_for_wb, & !$OMP grad_t_adj_inv_rdz, grad_q_adj_inv_rdz) - !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - - grad_t_adj(i,j) = zero - grad_q_adj(i,j) = zero - if ( unstable(i,j) ) then - ! Here this is an estimate of the gradient adjustment applied - ! the previous timestep (assumes T1_SD has not changed much, - ! which in turn assumes the surface fluxes have not) - if (flux_grad == Locketal2000) then - grad_t_adj(i,j) = min( max_t_grad , & - a_grad_adj * t1_sd(i,j) / zh_prev(i,j) ) - grad_q_adj(i,j) = zero - else if (flux_grad == HoltBov1993) then - ! Use constants from Holtslag and Boville (1993) - ! Conv limit GAMMA_TH = 10 *FTL1/(wstar*zh) - ! Neut limit GAMMA_TH = 7.2*wstar*FTL1/(ustar^2*zh) - wstar3 = fb_surf(i,j) * zh_prev(i,j) - c_ws = 0.6_r_bl - w_m =( v_s(i,j)**3 + c_ws*wstar3 )**one_third - - grad_t_adj(i,j) = a_ga_hb93*(wstar3**one_third)*ftl(i,j,1) & - / ( rhostar_gb(i,j)*w_m*w_m*zh_prev(i,j) ) - ! GRAD_Q_ADJ(I,j) = A_GA_HB93*(WSTAR3**one_third)*FQW(I,j,1) - ! / ( RHOSTAR_GB(I,j)*W_M*W_M*ZH_PREV(I,j) ) - grad_q_adj(i,j) = zero - else if (flux_grad == LockWhelan2006) then - ! Use constants from LockWhelan2006 - ! Conv limit GAMMA_TH = 10 *FTL1/(wstar*zh) - ! Neut limit GAMMA_TH = 7.5*FTL1/(ustar*zh) - wstar3 = fb_surf(i,j) * zh_prev(i,j) - c_ws = 0.42_r_bl ! = 0.75^3 - pr_neut = 0.75_r_bl - w_h = ( ( v_s(i,j)**3+c_ws*wstar3 )**one_third )/ pr_neut - - grad_t_adj(i,j) = a_ga_lw06 * ftl(i,j,1) & - / ( rhostar_gb(i,j)*w_h*zh_prev(i,j) ) - grad_q_adj(i,j) = a_ga_lw06 * fqw(i,j,1) & - / ( rhostar_gb(i,j)*w_h*zh_prev(i,j) ) - end if - end if ! test on UNSTABLE +do i = pdims%i_start, pdims%i_end + + grad_t_adj(i,j) = zero + grad_q_adj(i,j) = zero + if ( unstable(i,j) ) then + ! Here this is an estimate of the gradient adjustment applied + ! the previous timestep (assumes T1_SD has not changed much, + ! which in turn assumes the surface fluxes have not) + if (flux_grad == Locketal2000) then + grad_t_adj(i,j) = min( max_t_grad , & + a_grad_adj * t1_sd(i,j) / zh_prev(i,j) ) + grad_q_adj(i,j) = zero + else if (flux_grad == HoltBov1993) then + ! Use constants from Holtslag and Boville (1993) + ! Conv limit GAMMA_TH = 10 *FTL1/(wstar*zh) + ! Neut limit GAMMA_TH = 7.2*wstar*FTL1/(ustar^2*zh) + wstar3 = fb_surf(i,j) * zh_prev(i,j) + c_ws = 0.6_r_bl + w_m =( v_s(i,j)**3 + c_ws*wstar3 )**one_third + + grad_t_adj(i,j) = a_ga_hb93*(wstar3**one_third)*ftl(i,j,1) & + / ( rhostar_gb(i,j)*w_m*w_m*zh_prev(i,j) ) + ! GRAD_Q_ADJ(I,j) = A_GA_HB93*(WSTAR3**one_third)*FQW(I,j,1) + ! / ( RHOSTAR_GB(I,j)*W_M*W_M*ZH_PREV(I,j) ) + grad_q_adj(i,j) = zero + else if (flux_grad == LockWhelan2006) then + ! Use constants from LockWhelan2006 + ! Conv limit GAMMA_TH = 10 *FTL1/(wstar*zh) + ! Neut limit GAMMA_TH = 7.5*FTL1/(ustar*zh) + wstar3 = fb_surf(i,j) * zh_prev(i,j) + c_ws = 0.42_r_bl ! = 0.75^3 + pr_neut = 0.75_r_bl + w_h = ( ( v_s(i,j)**3+c_ws*wstar3 )**one_third )/ pr_neut + + grad_t_adj(i,j) = a_ga_lw06 * ftl(i,j,1) & + / ( rhostar_gb(i,j)*w_h*zh_prev(i,j) ) + grad_q_adj(i,j) = a_ga_lw06 * fqw(i,j,1) & + / ( rhostar_gb(i,j)*w_h*zh_prev(i,j) ) + end if + end if ! test on UNSTABLE - end do end do !$OMP end do +!end do ! Water tracers assume flux_grad == Locketal2000 if (l_wtrac) then do i_wt = 1, n_wtrac -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - wtrac_bl(i_wt)%grad_q_adj(i,j) = zero - end do +! !$OMP do SCHEDULE(STATIC) +! do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + wtrac_bl(i_wt)%grad_q_adj(i,j) = zero end do -!$OMP end do + !$OMP end do +! end do +! !$OMP end do end do end if @@ -2673,46 +2672,45 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(STATIC) do k = 1, bl_levels - do j = pdims%j_start, pdims%j_end - - do i = pdims%i_start, pdims%i_end - if (k <= ntml_prev(i,j)) then - dsldz(i) = -grcp + grad_t_adj(i,j) - else - dsldz(i) = -grcp - end if - end do + !do j = pdims%j_start, pdims%j_end + do i = pdims%i_start, pdims%i_end + if (k <= ntml_prev(i,j)) then + dsldz(i) = -grcp + grad_t_adj(i,j) + else + dsldz(i) = -grcp + end if + end do !DIR$ NOFUSION !DIR$ VECTOR ALWAYS - do i = pdims%i_start, pdims%i_end - virt_factor = one + c_virtual*q(i,j,k) - qcl(i,j,k) - & - qcf(i,j,k) - - dqcldz(i,j,k) = -( dsldz(i)*dqsdt(i,j,k) & - + g*qs(i,j,k)/(r*t(i,j,k)*virt_factor) ) & - / ( one + lcrcp*dqsdt(i,j,k) ) - dqcfdz(i,j,k) = -( dsldz(i)*dqsdt(i,j,k) & - + g*qs(i,j,k)/(r*t(i,j,k)*virt_factor) ) * fgf & - / ( one + lsrcp*dqsdt(i,j,k) ) - end do + do i = pdims%i_start, pdims%i_end + virt_factor = one + c_virtual*q(i,j,k) - qcl(i,j,k) - & + qcf(i,j,k) + + dqcldz(i,j,k) = -( dsldz(i)*dqsdt(i,j,k) & + + g*qs(i,j,k)/(r*t(i,j,k)*virt_factor) ) & + / ( one + lcrcp*dqsdt(i,j,k) ) + dqcfdz(i,j,k) = -( dsldz(i)*dqsdt(i,j,k) & + + g*qs(i,j,k)/(r*t(i,j,k)*virt_factor) ) * fgf & + / ( one + lsrcp*dqsdt(i,j,k) ) + end do ! limit calculation to greater than a small cloud fraction !DIR$ NOFUSION - do i = pdims%i_start, pdims%i_end - if ( qcl(i,j,k) + qcf(i,j,k) > zero & - .and. cf(i,j,k) > 1.0e-3_r_bl ) then - cfl(i,j,k) = cf(i,j,k) * qcl(i,j,k) / & - ( qcl(i,j,k) + qcf(i,j,k) ) - cff(i,j,k) = cf(i,j,k) * qcf(i,j,k) / & - ( qcl(i,j,k) + qcf(i,j,k) ) - else - cfl(i,j,k) = zero - cff(i,j,k) = zero - end if + do i = pdims%i_start, pdims%i_end + if ( qcl(i,j,k) + qcf(i,j,k) > zero & + .and. cf(i,j,k) > 1.0e-3_r_bl ) then + cfl(i,j,k) = cf(i,j,k) * qcl(i,j,k) / & + ( qcl(i,j,k) + qcf(i,j,k) ) + cff(i,j,k) = cf(i,j,k) * qcf(i,j,k) / & + ( qcl(i,j,k) + qcf(i,j,k) ) + else + cfl(i,j,k) = zero + cff(i,j,k) = zero + end if - end do end do + !end do end do !$OMP end do @@ -2724,8 +2722,9 @@ subroutine kmkhz_9c ( & ! First the SML !--------------- -!$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end + +! do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end cloud_base(i,j)= .false. zc(i,j) = zero @@ -2742,8 +2741,9 @@ subroutine kmkhz_9c ( & if ( l_check_ntp1 ) cf_sml(i,j) = max( cf_sml(i,j), cf(i,j,k+1) ) end if end do -end do -!$OMP end do NOWAIT + !$OMP end do NOWAIT +! end do + !----------------------------------------------------------------------- ! First find cloud-base as seen by the cloud scheme @@ -2752,258 +2752,276 @@ subroutine kmkhz_9c ( & ! to use as first guess or lower limit !----------------------------------------------------------------------- + +! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - k_level(i,j) = ntml(i,j) - if ( cf_sml(i,j) > sc_cftol ) then - if ( .not. l_check_ntp1 ) k_level(i,j) = ntml(i,j)-1 - do while ( cf(i,j,max(k_level(i,j),1)) > sc_cftol & - .and. k_level(i,j) >= 2 ) - k_level(i,j) = k_level(i,j) - 1 - end do - end if - end do +do i = pdims%i_start, pdims%i_end + k_level(i,j) = ntml(i,j) + if ( cf_sml(i,j) > sc_cftol ) then + if ( .not. l_check_ntp1 ) k_level(i,j) = ntml(i,j)-1 + do while ( cf(i,j,max(k_level(i,j),1)) > sc_cftol & + .and. k_level(i,j) >= 2 ) + k_level(i,j) = k_level(i,j) - 1 + end do + end if end do !$OMP end do NOWAIT +! end do + + +! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( cf_sml(i,j) > sc_cftol ) then - if ( k_level(i,j) == 1 .and. & - cf(i,j,max(k_level(i,j),1)) > sc_cftol) then - z_cf_base(i,j) = zero - else - z_cf_base(i,j) = z_uv(i,j,k_level(i,j)+1) - end if - zc(i,j) = z_ctop(i,j) - z_cf_base(i,j) +do i = pdims%i_start, pdims%i_end + if ( cf_sml(i,j) > sc_cftol ) then + if ( k_level(i,j) == 1 .and. & + cf(i,j,max(k_level(i,j),1)) > sc_cftol) then + z_cf_base(i,j) = zero + else + z_cf_base(i,j) = z_uv(i,j,k_level(i,j)+1) end if - end do + zc(i,j) = z_ctop(i,j) - z_cf_base(i,j) + end if end do !$OMP end do NOWAIT +! end do + !-------------------------------------------------- ! Find lowest level within ML with max CF !-------------------------------------------------- + +! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - do k = min(bl_levels, ntml(i,j)+p1), 1, -1 - if ( .not. cloud_base(i,j) .and. & - cf_sml(i,j) > sc_cftol ) then - ! within cloudy boundary layer - if ( k == 1) then - cloud_base(i,j) = .true. - else - if ( cf(i,j,k-1) < cf(i,j,k) ) cloud_base(i,j) = .true. - end if - k_cbase(i,j) = k +do i = pdims%i_start, pdims%i_end + do k = min(bl_levels, ntml(i,j)+p1), 1, -1 + if ( .not. cloud_base(i,j) .and. & + cf_sml(i,j) > sc_cftol ) then + ! within cloudy boundary layer + if ( k == 1) then + cloud_base(i,j) = .true. + else + if ( cf(i,j,k-1) < cf(i,j,k) ) cloud_base(i,j) = .true. end if - end do ! K - end do ! I -end do ! j + k_cbase(i,j) = k + end if + end do ! K +end do ! I !$OMP end do NOWAIT +! end do ! j + + +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end +do i = pdims%i_start, pdims%i_end - !-------------------------------------------------- - ! Use adiabatic qcl gradient to estimate cloud-base - ! from in-cloud qcl in level K_CBASE - ! If k_cbase = 0 then it hasn't been initialised - !-------------------------------------------------- - - if ( cloud_base(i,j) .and. k_cbase(i,j) /= 0 ) then - z_cbase = z_tq(i,j,k_cbase(i,j)) - & - qcl(i,j,k_cbase(i,j)) / & - ( cf(i,j,k_cbase(i,j))*dqcldz(i,j,k_cbase(i,j)) ) - if ( dqcfdz(i,j,k_cbase(i,j)) > zero ) then - z_cbase = min( z_cbase, z_tq(i,j,k_cbase(i,j)) - & - qcf(i,j,k_cbase(i,j)) / & - ( cf(i,j,k_cbase(i,j))*dqcfdz(i,j,k_cbase(i,j)) ) & - ) - else - !--------------------------------------------------------- - ! No adiabatic QCF gradient so find lowest level, K_CFF, - ! with CFF>SC_CFTOL and assume cloud-base within that leve - !--------------------------------------------------------- - !Initialise K_CFF = lowest level with ice cloud - k_cff = k_cbase(i,j) - if (k_cff > 1) then - do while ( cff(i,j,k_cff) > sc_cftol & - .and. k_cff > 1 ) - k_cff = k_cff - 1 - end do - end if - if ( cff(i,j,k_cff) <= sc_cftol .and. & - k_cff < k_cbase(i,j) ) & - k_cff = k_cff + 1 - ! will want to raise K_CFF back up one level unless - ! level 1 is cloudy or no sig frozen cloud at all - z_cbase = min( z_cbase, z_top(i,j,k_cff) - & - dzl(i,j,k_cff) & - * cff(i,j,k_cff)/cf(i,j,k_cff) ) - end if - !------------------------------------------------------ - ! use cloud-base as seen by cloud scheme as lower limit - ! and base of level NTML+1 as upper limit - !------------------------------------------------------ - z_cbase = min( z_uv(i,j,ntml(i,j)+1), & - max( z_cf_base(i,j), z_cbase) ) + !-------------------------------------------------- + ! Use adiabatic qcl gradient to estimate cloud-base + ! from in-cloud qcl in level K_CBASE + ! If k_cbase = 0 then it hasn't been initialised + !-------------------------------------------------- - zc(i,j) = z_ctop(i,j) - z_cbase + if ( cloud_base(i,j) .and. k_cbase(i,j) /= 0 ) then + z_cbase = z_tq(i,j,k_cbase(i,j)) - & + qcl(i,j,k_cbase(i,j)) / & + ( cf(i,j,k_cbase(i,j))*dqcldz(i,j,k_cbase(i,j)) ) + if ( dqcfdz(i,j,k_cbase(i,j)) > zero ) then + z_cbase = min( z_cbase, z_tq(i,j,k_cbase(i,j)) - & + qcf(i,j,k_cbase(i,j)) / & + ( cf(i,j,k_cbase(i,j))*dqcfdz(i,j,k_cbase(i,j)) ) & + ) + else + !--------------------------------------------------------- + ! No adiabatic QCF gradient so find lowest level, K_CFF, + ! with CFF>SC_CFTOL and assume cloud-base within that leve + !--------------------------------------------------------- + !Initialise K_CFF = lowest level with ice cloud + k_cff = k_cbase(i,j) + if (k_cff > 1) then + do while ( cff(i,j,k_cff) > sc_cftol & + .and. k_cff > 1 ) + k_cff = k_cff - 1 + end do + end if + if ( cff(i,j,k_cff) <= sc_cftol .and. & + k_cff < k_cbase(i,j) ) & + k_cff = k_cff + 1 + ! will want to raise K_CFF back up one level unless + ! level 1 is cloudy or no sig frozen cloud at all + z_cbase = min( z_cbase, z_top(i,j,k_cff) - & + dzl(i,j,k_cff) & + * cff(i,j,k_cff)/cf(i,j,k_cff) ) end if + !------------------------------------------------------ + ! use cloud-base as seen by cloud scheme as lower limit + ! and base of level NTML+1 as upper limit + !------------------------------------------------------ + z_cbase = min( z_uv(i,j,ntml(i,j)+1), & + max( z_cf_base(i,j), z_cbase) ) + + zc(i,j) = z_ctop(i,j) - z_cbase + end if - end do end do !$OMP end do NOWAIT +!end do + !----------------------------------------------------------------------- ! Second DSC layer !----------------------------------------------------------------------- -!$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - cloud_base(i,j) = .false. - zc_dsc(i,j) = zero - k_cbase(i,j) = 0 - z_cf_base(i,j) = zhsc(i,j) - z_ctop(i,j) = zhsc(i,j) - if ( dsc(i,j) ) then - k = ntdsc(i,j) - cf_dsc(i,j) = max( cf(i,j,k), cf(i,j,k-1) ) - if ( l_check_ntp1 ) cf_dsc(i,j) = max( cf_dsc(i,j), cf(i,j,k+1) ) - else - cf_dsc(i,j) = zero - end if - end do +!do j = pdims%j_start, pdims%j_end +!$OMP do SCHEDULE(STATIC) +do i = pdims%i_start, pdims%i_end + cloud_base(i,j) = .false. + zc_dsc(i,j) = zero + k_cbase(i,j) = 0 + z_cf_base(i,j) = zhsc(i,j) + z_ctop(i,j) = zhsc(i,j) + + if ( dsc(i,j) ) then + k = ntdsc(i,j) + cf_dsc(i,j) = max( cf(i,j,k), cf(i,j,k-1) ) + if ( l_check_ntp1 ) cf_dsc(i,j) = max( cf_dsc(i,j), cf(i,j,k+1) ) + else + cf_dsc(i,j) = zero + end if end do !$OMP end do NOWAIT +!end do + !------------------------------------------------------------- ! Find cloud-base as seen by cloud scheme, Z_CF_BASE, ! to use as first guess or lower limit and find cloud top. !------------------------------------------------------------- + +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - k_level(i,j) = ntdsc(i,j) - if ( cf_dsc(i,j) > sc_cftol ) then - ! assume level NTDSC is cloudy so start from NTDSC-1 - if ( .not. l_check_ntp1 ) k_level(i,j) = max( 2, ntdsc(i,j) - 1 ) - do while ( cf(i,j,k_level(i,j)) > sc_cftol & - .and. k_level(i,j) >= 2 ) - k_level(i,j) = k_level(i,j) - 1 - end do - end if - end do +do i = pdims%i_start, pdims%i_end + k_level(i,j) = ntdsc(i,j) + if ( cf_dsc(i,j) > sc_cftol ) then + ! assume level NTDSC is cloudy so start from NTDSC-1 + if ( .not. l_check_ntp1 ) k_level(i,j) = max( 2, ntdsc(i,j) - 1 ) + do while ( cf(i,j,k_level(i,j)) > sc_cftol & + .and. k_level(i,j) >= 2 ) + k_level(i,j) = k_level(i,j) - 1 + end do + end if end do !$OMP end do NOWAIT +!end do + + +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( cf_dsc(i,j) > sc_cftol ) then - if ( k_level(i,j) == 1 .and. & - cf(i,j,max(k_level(i,j),1)) > sc_cftol) then - z_cf_base(i,j) = zero - else - z_cf_base(i,j) = z_uv(i,j,k_level(i,j)+1) - end if - zc_dsc(i,j) = z_ctop(i,j) - z_cf_base(i,j) ! first guess +do i = pdims%i_start, pdims%i_end + if ( cf_dsc(i,j) > sc_cftol ) then + if ( k_level(i,j) == 1 .and. & + cf(i,j,max(k_level(i,j),1)) > sc_cftol) then + z_cf_base(i,j) = zero + else + z_cf_base(i,j) = z_uv(i,j,k_level(i,j)+1) end if - end do + zc_dsc(i,j) = z_ctop(i,j) - z_cf_base(i,j) ! first guess + end if end do !$OMP end do NOWAIT +!end do + !-------------------------------------------------- ! Find lowest level within ML with max CF !-------------------------------------------------- -!$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - do k = min(bl_levels,ntdsc(i,j)+p1), 1, -1 - if ( .not. cloud_base(i,j) .and. & - cf_dsc(i,j) > sc_cftol ) then - ! within cloudy boundary layer - if ( k == 1) then - cloud_base(i,j) = .true. - else - if ( cf(i,j,k-1) < cf(i,j,k) ) cloud_base(i,j) = .true. - end if - k_cbase(i,j) = k - end if - end do ! K - end do ! I -end do ! J -!$OMP end do NOWAIT +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - - !-------------------------------------------------- - ! use adiabatic qcl gradient to estimate cloud-base - ! from in-cloud qcl in level K_CBASE - !-------------------------------------------------- - if ( cloud_base(i,j) .and. k_cbase(i,j) /= 0 ) then - z_cbase = z_tq(i,j,k_cbase(i,j)) - & - qcl(i,j,k_cbase(i,j)) / & - ( cf(i,j,k_cbase(i,j))*dqcldz(i,j,k_cbase(i,j)) ) - if ( dqcfdz(i,j,k_cbase(i,j)) > zero ) then - z_cbase = min( z_cbase, z_tq(i,j,k_cbase(i,j)) - & - qcf(i,j,k_cbase(i,j)) / & - ( cf(i,j,k_cbase(i,j))*dqcfdz(i,j,k_cbase(i,j)) ) & - ) +do i = pdims%i_start, pdims%i_end + do k = min(bl_levels,ntdsc(i,j)+p1), 1, -1 + if ( .not. cloud_base(i,j) .and. & + cf_dsc(i,j) > sc_cftol ) then + ! within cloudy boundary layer + if ( k == 1) then + cloud_base(i,j) = .true. else - ! Initialise K_CFF - k_cff = k_cbase(i,j) - if (k_cff > 1) then - do while ( cff(i,j,k_cff) > sc_cftol & - .and. k_cff > 1) - k_cff = k_cff - 1 - end do - end if - !---------------------------------------------------------- - ! No adiabatic QCF gradient so find lowest level, K_CFF, - ! with CFF>SC_CFTOL and assume cloud-base within that level - !---------------------------------------------------------- - if ( cff(i,j,k_cff) <= sc_cftol .and. & - k_cff < k_cbase(i,j) ) & - k_cff = k_cff + 1 - ! will want to raise K_CFF back up one level unless - ! level 1 is cloudy or no sig frozen cloud at all - z_cbase = min( z_cbase, z_top(i,j,k_cff) - & - dzl(i,j,k_cff) & - * cff(i,j,k_cff)/cf(i,j,k_cff) ) + if ( cf(i,j,k-1) < cf(i,j,k) ) cloud_base(i,j) = .true. end if - !------------------------------------------------------ - ! use cloud-base as seen by cloud scheme as lower limit - ! and base of level NTDSC+1 as upper limit - !------------------------------------------------------ - z_cbase = min( z_uv(i,j,ntdsc(i,j)+1), & - max( z_cf_base(i,j) , z_cbase) ) - - zc_dsc(i,j) = z_ctop(i,j) - z_cbase + k_cbase(i,j) = k end if + end do ! K +end do ! I +!$OMP end do NOWAIT +!end do ! J - !----------------------------------------------------------------- - ! Layer cloud depth cannot be > the layer depth itself. - !----------------------------------------------------------------- - zc_dsc(i,j) = min( zc_dsc(i,j), dscdepth(i,j) ) - end do !I -end do !J +! do j = pdims%j_start, pdims%j_end +!$OMP do SCHEDULE(STATIC) +do i = pdims%i_start, pdims%i_end + + !-------------------------------------------------- + ! use adiabatic qcl gradient to estimate cloud-base + ! from in-cloud qcl in level K_CBASE + !-------------------------------------------------- + if ( cloud_base(i,j) .and. k_cbase(i,j) /= 0 ) then + z_cbase = z_tq(i,j,k_cbase(i,j)) - & + qcl(i,j,k_cbase(i,j)) / & + ( cf(i,j,k_cbase(i,j))*dqcldz(i,j,k_cbase(i,j)) ) + if ( dqcfdz(i,j,k_cbase(i,j)) > zero ) then + z_cbase = min( z_cbase, z_tq(i,j,k_cbase(i,j)) - & + qcf(i,j,k_cbase(i,j)) / & + ( cf(i,j,k_cbase(i,j))*dqcfdz(i,j,k_cbase(i,j)) ) & + ) + else + ! Initialise K_CFF + k_cff = k_cbase(i,j) + if (k_cff > 1) then + do while ( cff(i,j,k_cff) > sc_cftol & + .and. k_cff > 1) + k_cff = k_cff - 1 + end do + end if + !---------------------------------------------------------- + ! No adiabatic QCF gradient so find lowest level, K_CFF, + ! with CFF>SC_CFTOL and assume cloud-base within that level + !---------------------------------------------------------- + if ( cff(i,j,k_cff) <= sc_cftol .and. & + k_cff < k_cbase(i,j) ) & + k_cff = k_cff + 1 + ! will want to raise K_CFF back up one level unless + ! level 1 is cloudy or no sig frozen cloud at all + z_cbase = min( z_cbase, z_top(i,j,k_cff) - & + dzl(i,j,k_cff) & + * cff(i,j,k_cff)/cf(i,j,k_cff) ) + end if + !------------------------------------------------------ + ! use cloud-base as seen by cloud scheme as lower limit + ! and base of level NTDSC+1 as upper limit + !------------------------------------------------------ + z_cbase = min( z_uv(i,j,ntdsc(i,j)+1), & + max( z_cf_base(i,j) , z_cbase) ) + + zc_dsc(i,j) = z_ctop(i,j) - z_cbase + end if + + !----------------------------------------------------------------- + ! Layer cloud depth cannot be > the layer depth itself. + !----------------------------------------------------------------- + + zc_dsc(i,j) = min( zc_dsc(i,j), dscdepth(i,j) ) + +end do !I !$OMP end do +! end do !J + !----------------------------------------------------------------------- ! 6. Calculate buoyancy flux factor used in the diagnosis of decoupling @@ -3020,62 +3038,62 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(DYNAMIC) do k = 2, bl_levels - do j = pdims%j_start, pdims%j_end + !do j = pdims%j_start, pdims%j_end - ! This is to help vectorization - do i = pdims%i_start, pdims%i_end - if ( k <= ntml_prev(i,j) .or. l_converge_ga ) then - ! If using more accurate treatment of gradient adjustment in the - ! buoyancy-flux integration, it needs to be set on all levels. - grad_t_adj_inv_rdz(i) = grad_t_adj(i,j)/rdz(i,j,k) - grad_q_adj_inv_rdz(i) = grad_q_adj(i,j)/rdz(i,j,k) - else - grad_t_adj_inv_rdz(i) = zero - grad_q_adj_inv_rdz(i) = zero - end if + ! This is to help vectorization + do i = pdims%i_start, pdims%i_end + if ( k <= ntml_prev(i,j) .or. l_converge_ga ) then + ! If using more accurate treatment of gradient adjustment in the + ! buoyancy-flux integration, it needs to be set on all levels. + grad_t_adj_inv_rdz(i) = grad_t_adj(i,j)/rdz(i,j,k) + grad_q_adj_inv_rdz(i) = grad_q_adj(i,j)/rdz(i,j,k) + else + grad_t_adj_inv_rdz(i) = zero + grad_q_adj_inv_rdz(i) = zero + end if - !---------------------------------------------------------- - ! CF_FOR_WB is uniform `bl' CF for use within cloud layers - !---------------------------------------------------------- - cf_for_wb(i) = zero - z_cbase = zh(i,j)-zc(i,j) - zdsc_cbase = zhsc(i,j)-zc_dsc(i,j) - if ( z_tq(i,j,k) <= zh(i,j) .and. & - z_tq(i,j,k) >= z_cbase) cf_for_wb(i) = cf_sml(i,j) - if ( z_tq(i,j,k) <= zhsc(i,j) .and. & - z_tq(i,j,k) >= zdsc_cbase) cf_for_wb(i) = cf_dsc(i,j) - end do + !---------------------------------------------------------- + ! CF_FOR_WB is uniform `bl' CF for use within cloud layers + !---------------------------------------------------------- + cf_for_wb(i) = zero + z_cbase = zh(i,j)-zc(i,j) + zdsc_cbase = zhsc(i,j)-zc_dsc(i,j) + if ( z_tq(i,j,k) <= zh(i,j) .and. & + z_tq(i,j,k) >= z_cbase) cf_for_wb(i) = cf_sml(i,j) + if ( z_tq(i,j,k) <= zhsc(i,j) .and. & + z_tq(i,j,k) >= zdsc_cbase) cf_for_wb(i) = cf_dsc(i,j) + end do !DIR$ NOFUSION !DIR$ VECTOR ALWAYS - do i = pdims%i_start, pdims%i_end - dqw = qw(i,j,k) - qw(i,j,k-1) - dsl = sl(i,j,k) - sl(i,j,k-1) - dsl_ga = dsl - grad_t_adj_inv_rdz(i) - dqw_ga = dqw - grad_q_adj_inv_rdz(i) + do i = pdims%i_start, pdims%i_end + dqw = qw(i,j,k) - qw(i,j,k-1) + dsl = sl(i,j,k) - sl(i,j,k-1) + dsl_ga = dsl - grad_t_adj_inv_rdz(i) + dqw_ga = dqw - grad_q_adj_inv_rdz(i) - !---------------------------------------------------------- - ! WB = -K_SURF*(DB/DZ - gamma_buoy) - K_TOP*DB/DZ - ! This is integrated in EXCF_NL, iterating the K profiles. - ! Here the relevant integrated DB/DZ factors are calculated - !---------------------------------------------------------- - db_ga_dry(i,j,k) = - g * & - ( btm(i,j,k-1)*dsl_ga + bqm(i,j,k-1)*dqw_ga ) - db_noga_dry(i,j,k) = - g * & - ( btm(i,j,k-1)*dsl + bqm(i,j,k-1)*dqw ) - db_ga_cld(i,j,k) = - g * & - ( btm_cld(i,j,k-1)*dsl_ga + bqm_cld(i,j,k-1)*dqw_ga ) - db_noga_cld(i,j,k) = - g * & - ( btm_cld(i,j,k-1)*dsl + bqm_cld(i,j,k-1)*dqw ) - !------------------------------------------------------- - ! Weight cloud layer factors with cloud fraction - !------------------------------------------------------- - db_ga_cld(i,j,k) = db_ga_dry(i,j,k)*(one-cf_for_wb(i)) + & - db_ga_cld(i,j,k)*cf_for_wb(i) - db_noga_cld(i,j,k) = db_noga_dry(i,j,k)*(one-cf_for_wb(i)) + & - db_noga_cld(i,j,k)*cf_for_wb(i) - end do + !---------------------------------------------------------- + ! WB = -K_SURF*(DB/DZ - gamma_buoy) - K_TOP*DB/DZ + ! This is integrated in EXCF_NL, iterating the K profiles. + ! Here the relevant integrated DB/DZ factors are calculated + !---------------------------------------------------------- + db_ga_dry(i,j,k) = - g * & + ( btm(i,j,k-1)*dsl_ga + bqm(i,j,k-1)*dqw_ga ) + db_noga_dry(i,j,k) = - g * & + ( btm(i,j,k-1)*dsl + bqm(i,j,k-1)*dqw ) + db_ga_cld(i,j,k) = - g * & + ( btm_cld(i,j,k-1)*dsl_ga + bqm_cld(i,j,k-1)*dqw_ga ) + db_noga_cld(i,j,k) = - g * & + ( btm_cld(i,j,k-1)*dsl + bqm_cld(i,j,k-1)*dqw ) + !------------------------------------------------------- + ! Weight cloud layer factors with cloud fraction + !------------------------------------------------------- + db_ga_cld(i,j,k) = db_ga_dry(i,j,k)*(one-cf_for_wb(i)) + & + db_ga_cld(i,j,k)*cf_for_wb(i) + db_noga_cld(i,j,k) = db_noga_dry(i,j,k)*(one-cf_for_wb(i)) + & + db_noga_cld(i,j,k)*cf_for_wb(i) end do + !end do end do !$OMP end do NOWAIT @@ -3083,60 +3101,64 @@ subroutine kmkhz_9c ( & ! 7. Calculate inputs for the top of b.l. entrainment parametrization !----------------------------------------------------------------------- + +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - zeta_r_dsc(i,j) = zero - chi_s_dsct(i,j) = zero - d_siems_dsc(i,j) = zero - br_fback_dsc(i,j)= zero - cld_factor_dsc(i,j) = zero - bt_dsct(i,j) = zero - btt_dsct(i,j) = zero - db_dsct(i,j) = zero - db_dsct_cld(i,j) = zero - chi_s_top(i,j) = zero - d_siems(i,j) = zero - br_fback(i,j)= zero - cld_factor(i,j) = zero - bt_top(i,j) = zero - btt_top(i,j) = zero - btc_top(i,j) = zero - db_top(i,j) = zero - db_top_cld(i,j) = zero ! default required if COUPLED - z_cld(i,j) = zero - z_cld_dsc(i,j) = zero - end do +do i = pdims%i_start, pdims%i_end + zeta_r_dsc(i,j) = zero + chi_s_dsct(i,j) = zero + d_siems_dsc(i,j) = zero + br_fback_dsc(i,j)= zero + cld_factor_dsc(i,j) = zero + bt_dsct(i,j) = zero + btt_dsct(i,j) = zero + db_dsct(i,j) = zero + db_dsct_cld(i,j) = zero + chi_s_top(i,j) = zero + d_siems(i,j) = zero + br_fback(i,j)= zero + cld_factor(i,j) = zero + bt_top(i,j) = zero + btt_top(i,j) = zero + btc_top(i,j) = zero + db_top(i,j) = zero + db_top_cld(i,j) = zero ! default required if COUPLED + z_cld(i,j) = zero + z_cld_dsc(i,j) = zero end do !$OMP end do +!end do + !----------------------------------------------------------------------- ! 7.1 Calculate surface buoyancy flux !----------------------------------------------------------------------- -!$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - ! use mixed-layer average of buoyancy parameters - bflux_surf(i,j) = one_half * g * ( & - (btm(i,j,1)+btm(i,j,ntml(i,j)))*ftl(i,j,1) + & - (bqm(i,j,1)+bqm(i,j,ntml(i,j)))*fqw(i,j,1) ) - - if ( bflux_surf(i,j) > zero ) then - bflux_surf_sat(i,j) = one_half * g * ( & - (btm_cld(i,j,1)+btm_cld(i,j,ntml(i,j)))*ftl(i,j,1) + & - (bqm_cld(i,j,1)+bqm_cld(i,j,ntml(i,j)))*fqw(i,j,1) ) - if ( coupled(i,j) ) bflux_surf_sat(i,j) = one_half * g * ( & - (btm_cld(i,j,1)+btm_cld(i,j,ntdsc(i,j)))*ftl(i,j,1) + & - (bqm_cld(i,j,1)+bqm_cld(i,j,ntdsc(i,j)))*fqw(i,j,1) ) - else - bflux_surf_sat(i,j) = zero - end if +!do j = pdims%j_start, pdims%j_end +!$OMP do SCHEDULE(STATIC) +do i = pdims%i_start, pdims%i_end + + ! use mixed-layer average of buoyancy parameters + bflux_surf(i,j) = one_half * g * ( & + (btm(i,j,1)+btm(i,j,ntml(i,j)))*ftl(i,j,1) + & + (bqm(i,j,1)+bqm(i,j,ntml(i,j)))*fqw(i,j,1) ) + + if ( bflux_surf(i,j) > zero ) then + bflux_surf_sat(i,j) = one_half * g * ( & + (btm_cld(i,j,1)+btm_cld(i,j,ntml(i,j)))*ftl(i,j,1) + & + (bqm_cld(i,j,1)+bqm_cld(i,j,ntml(i,j)))*fqw(i,j,1) ) + if ( coupled(i,j) ) bflux_surf_sat(i,j) = one_half * g * ( & + (btm_cld(i,j,1)+btm_cld(i,j,ntdsc(i,j)))*ftl(i,j,1) + & + (bqm_cld(i,j,1)+bqm_cld(i,j,ntdsc(i,j)))*fqw(i,j,1) ) + else + bflux_surf_sat(i,j) = zero + end if - end do end do !$OMP end do NOWAIT +!end do + !----------------------------------------------------------------------- ! 7.2 Calculation of cloud fraction weighted thickness of @@ -3144,44 +3166,44 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- !$OMP do SCHEDULE(DYNAMIC) -do jj = pdims%j_start, pdims%j_end, bl_segment_size +do ii = pdims%i_start, pdims%i_end, bl_segment_size do k = 1, bl_levels - do j = jj, min((jj+bl_segment_size)-1,pdims%j_end) - do i = pdims%i_start, pdims%i_end - if ( k <= ntml(i,j)+1 ) then - z_cld(i,j) = z_cld(i,j) + & - cf(i,j,k) * one_half * dzl(i,j,k) + & - min( cfl(i,j,k) * one_half * dzl(i,j,k) , & - qcl(i,j,k) / dqcldz(i,j,k) ) - if ( dqcfdz(i,j,k) > zero) then - z_cld(i,j) = z_cld(i,j) + & - min( cff(i,j,k) * one_half * dzl(i,j,k) , & - qcf(i,j,k) / dqcfdz(i,j,k) ) - else - z_cld(i,j) = z_cld(i,j) + cff(i,j,k) * one_half * dzl(i,j,k) - end if + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + !do i = pdims%i_start, pdims%i_end + if ( k <= ntml(i,j)+1 ) then + z_cld(i,j) = z_cld(i,j) + & + cf(i,j,k) * one_half * dzl(i,j,k) + & + min( cfl(i,j,k) * one_half * dzl(i,j,k) , & + qcl(i,j,k) / dqcldz(i,j,k) ) + if ( dqcfdz(i,j,k) > zero) then + z_cld(i,j) = z_cld(i,j) + & + min( cff(i,j,k) * one_half * dzl(i,j,k) , & + qcf(i,j,k) / dqcfdz(i,j,k) ) + else + z_cld(i,j) = z_cld(i,j) + cff(i,j,k) * one_half * dzl(i,j,k) end if + end if - if ( dsc(i,j) .and. k <= ntdsc(i,j)+1 .and. & - ( coupled(i,j) .or. & - z_top(i,j,k) >= zhsc(i,j)-zc_dsc(i,j) ) ) then - z_cld_dsc(i,j) = z_cld_dsc(i,j) + & - cf(i,j,k) * one_half * dzl(i,j,k) + & - min( cfl(i,j,k) * one_half * dzl(i,j,k) , & - qcl(i,j,k) / dqcldz(i,j,k) ) - if ( dqcfdz(i,j,k) > zero) then - z_cld_dsc(i,j) = z_cld_dsc(i,j) + & - min( cff(i,j,k) * one_half * dzl(i,j,k) , & - qcf(i,j,k) / dqcfdz(i,j,k) ) - else - z_cld_dsc(i,j) = z_cld_dsc(i,j) + & - cff(i,j,k) * one_half * dzl(i,j,k) - end if + if ( dsc(i,j) .and. k <= ntdsc(i,j)+1 .and. & + ( coupled(i,j) .or. & + z_top(i,j,k) >= zhsc(i,j)-zc_dsc(i,j) ) ) then + z_cld_dsc(i,j) = z_cld_dsc(i,j) + & + cf(i,j,k) * one_half * dzl(i,j,k) + & + min( cfl(i,j,k) * one_half * dzl(i,j,k) , & + qcl(i,j,k) / dqcldz(i,j,k) ) + if ( dqcfdz(i,j,k) > zero) then + z_cld_dsc(i,j) = z_cld_dsc(i,j) + & + min( cff(i,j,k) * one_half * dzl(i,j,k) , & + qcf(i,j,k) / dqcfdz(i,j,k) ) + else + z_cld_dsc(i,j) = z_cld_dsc(i,j) + & + cff(i,j,k) * one_half * dzl(i,j,k) end if - end do + end if + !end do end do end do -end do ! jj +end do ! ii !$OMP end do NOWAIT !----------------------------------------------------------------------- @@ -3191,63 +3213,159 @@ subroutine kmkhz_9c ( & !..assuming a discontinuous subgrid inversion structure. !---------------------------------------------------------------------- + +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - !-------------------------- - ! First the SML - !-------------------------- +do i = pdims%i_start, pdims%i_end + !-------------------------- + ! First the SML + !-------------------------- + qcl_ic_top(i,j) = zero + qcf_ic_top(i,j) = zero + cfl_ml = zero + cff_ml = zero + + km = ntml(i,j) + if ( sml_disc_inv(i,j) == 1 ) then + !----------------------------------------------------- + ! Extrapolate water contents from level with max CF, + ! out of NTML and NTML-1 (ie near top of SML), + ! to the top of the mixed layer + !----------------------------------------------------- + if (cf_sml(i,j) > zero) then + kmax = km + if (cf(i,j,km-1) > cf(i,j,km)) kmax = km-1 + if ( l_check_ntp1 .and. cf(i,j,km+1) > cf(i,j,kmax) ) kmax = km+1 + + cfl_ml = cf_sml(i,j)*cfl(i,j,kmax) & + /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) + cff_ml = cf_sml(i,j)*cff(i,j,kmax) & + /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) + + if (cfl_ml > 0.01_r_bl) qcl_ic_top(i,j) = qcl(i,j,kmax)/cfl_ml & + + ( zh(i,j)-z_tq(i,j,km) )*dqcldz(i,j,km) + if (cff_ml > 0.01_r_bl) qcf_ic_top(i,j) = qcf(i,j,kmax)/cff_ml & + + ( zh(i,j)-z_tq(i,j,km) )*dqcfdz(i,j,km) + end if + + dqw = dqw_sml(i,j) + dsl = dsl_sml(i,j) + ! ignore any cloud above the inversion + dqcl = - cfl_ml*qcl_ic_top(i,j) + dqcf = - cff_ml*qcf_ic_top(i,j) + + db_disc = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & + (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & + (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) + + if ( db_disc > 0.03_r_bl ) then + ! Diagnosed inversion statically stable and at least ~1K + db_top(i,j) = db_disc + else + ! Diagnosed inversion statically UNstable + ! Reset flag to use entrainment K (rather than fluxes) + sml_disc_inv(i,j) = 0 + zh(i,j) = z_uv(i,j,ntml(i,j)+1) + end if + end if ! disc inversion diagnosed + + if ( sml_disc_inv(i,j) == 0 ) then + ! Calculate using simple grid-level differences + kp = km+1 + dqw = qw(i,j,kp) - qw(i,j,km) + dsl = sl(i,j,kp) - sl(i,j,km) + qcl_ic_top(i,j) = qcl(i,j,km) + qcf_ic_top(i,j) = qcf(i,j,km) + dqcl = qcl(i,j,kp) - qcl_ic_top(i,j) + dqcf = qcf(i,j,kp) - qcf_ic_top(i,j) + db_top(i,j) = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & + (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & + (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) + end if ! no disc inversion diagnosed + + db_top_cld(i,j) = g * ( btm_cld(i,j,km)*dsl & + + bqm_cld(i,j,km)*dqw ) + denom = a_qsm(i,j,km)*dqw - a_dqsdtm(i,j,km)*dsl + if (abs(denom) > rbl_eps) then + chi_s_top(i,j) = -qcl_ic_top(i,j) / denom + chi_s_top(i,j) = max( zero, min( chi_s_top(i,j), one) ) + end if + + if ( db_top(i,j) < 0.003_r_bl ) then + ! Diagnosed inversion statically unstable: + ! ensure DB>0 so that entrainment is non-zero and + ! instability can be removed. + db_top(i,j) = 0.003_r_bl + db_top_cld(i,j) = zero ! set buoyancy reversal + chi_s_top(i,j) = zero ! term to zero + end if + +end do +!$OMP end do +!end do + + + !-------------------------- + ! Then the DSC layer + !-------------------------- + + +!do j = pdims%j_start, pdims%j_end +!$OMP do SCHEDULE(DYNAMIC) +do i = pdims%i_start, pdims%i_end + if ( dsc(i,j) ) then + qcl_ic_top(i,j) = zero qcf_ic_top(i,j) = zero cfl_ml = zero cff_ml = zero - km = ntml(i,j) - if ( sml_disc_inv(i,j) == 1 ) then + km = ntdsc(i,j) + if ( dsc_disc_inv(i,j) == 1 ) then !----------------------------------------------------- ! Extrapolate water contents from level with max CF, - ! out of NTML and NTML-1 (ie near top of SML), + ! out of NTDSC and NTDSC-1 (ie near top of DSC), ! to the top of the mixed layer !----------------------------------------------------- - if (cf_sml(i,j) > zero) then + if (cf_dsc(i,j) > zero) then kmax = km if (cf(i,j,km-1) > cf(i,j,km)) kmax = km-1 if ( l_check_ntp1 .and. cf(i,j,km+1) > cf(i,j,kmax) ) kmax = km+1 - cfl_ml = cf_sml(i,j)*cfl(i,j,kmax) & - /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) - cff_ml = cf_sml(i,j)*cff(i,j,kmax) & - /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) + cfl_ml = cf_dsc(i,j)*cfl(i,j,kmax) & + /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) + cff_ml = cf_dsc(i,j)*cff(i,j,kmax) & + /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) + if (cfl_ml > 0.01_r_bl) qcl_ic_top(i,j) = qcl(i,j,kmax)/cfl_ml & + + ( zhsc(i,j)-z_tq(i,j,km) )*dqcldz(i,j,km) + if (cff_ml > 0.01_r_bl) qcf_ic_top(i,j) = qcf(i,j,kmax)/cff_ml & + + ( zhsc(i,j)-z_tq(i,j,km) )*dqcfdz(i,j,km) - if (cfl_ml > 0.01_r_bl) qcl_ic_top(i,j) = qcl(i,j,kmax)/cfl_ml & - + ( zh(i,j)-z_tq(i,j,km) )*dqcldz(i,j,km) - if (cff_ml > 0.01_r_bl) qcf_ic_top(i,j) = qcf(i,j,kmax)/cff_ml & - + ( zh(i,j)-z_tq(i,j,km) )*dqcfdz(i,j,km) end if - dqw = dqw_sml(i,j) - dsl = dsl_sml(i,j) + dqw = dqw_dsc(i,j) + dsl = dsl_dsc(i,j) ! ignore any cloud above the inversion dqcl = - cfl_ml*qcl_ic_top(i,j) dqcf = - cff_ml*qcf_ic_top(i,j) - db_disc = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & - (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & - (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) + db_disc = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & + (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & + (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) if ( db_disc > 0.03_r_bl ) then - ! Diagnosed inversion statically stable and at least ~1K - db_top(i,j) = db_disc + ! Diagnosed inversion statically stable + db_dsct(i,j) = db_disc else ! Diagnosed inversion statically UNstable ! Reset flag to use entrainment K (rather than fluxes) - sml_disc_inv(i,j) = 0 - zh(i,j) = z_uv(i,j,ntml(i,j)+1) + dsc_disc_inv(i,j) = 0 + zhsc(i,j) = z_uv(i,j,ntdsc(i,j)+1) end if end if ! disc inversion diagnosed - if ( sml_disc_inv(i,j) == 0 ) then - ! Calculate using simple grid-level differences + if ( dsc_disc_inv(i,j) == 0 ) then + ! Calculate using simple grid-level differences kp = km+1 dqw = qw(i,j,kp) - qw(i,j,km) dsl = sl(i,j,kp) - sl(i,j,km) @@ -3255,241 +3373,151 @@ subroutine kmkhz_9c ( & qcf_ic_top(i,j) = qcf(i,j,km) dqcl = qcl(i,j,kp) - qcl_ic_top(i,j) dqcf = qcf(i,j,kp) - qcf_ic_top(i,j) - db_top(i,j) = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & - (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & + db_dsct(i,j) = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & + (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) end if ! no disc inversion diagnosed - db_top_cld(i,j) = g * ( btm_cld(i,j,km)*dsl & - + bqm_cld(i,j,km)*dqw ) + db_dsct_cld(i,j) = g * ( btm_cld(i,j,km)*dsl & + + bqm_cld(i,j,km)*dqw ) denom = a_qsm(i,j,km)*dqw - a_dqsdtm(i,j,km)*dsl if (abs(denom) > rbl_eps) then - chi_s_top(i,j) = -qcl_ic_top(i,j) / denom - chi_s_top(i,j) = max( zero, min( chi_s_top(i,j), one) ) + chi_s_dsct(i,j) = -qcl_ic_top(i,j) / denom + chi_s_dsct(i,j) = max( zero, min( chi_s_dsct(i,j), one) ) end if - if ( db_top(i,j) < 0.003_r_bl ) then + if ( db_dsct(i,j) < 0.003_r_bl ) then ! Diagnosed inversion statically unstable: ! ensure DB>0 so that entrainment is non-zero and ! instability can be removed. - db_top(i,j) = 0.003_r_bl - db_top_cld(i,j) = zero ! set buoyancy reversal - chi_s_top(i,j) = zero ! term to zero + db_dsct(i,j) = 0.003_r_bl + db_dsct_cld(i,j) = zero ! set buoyancy reversal + chi_s_dsct(i,j) = zero ! term to zero end if + end if ! test on DSC - end do -end do -!$OMP end do - - !-------------------------- - ! Then the DSC layer - !-------------------------- - -!$OMP do SCHEDULE(DYNAMIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( dsc(i,j) ) then - - qcl_ic_top(i,j) = zero - qcf_ic_top(i,j) = zero - cfl_ml = zero - cff_ml = zero - - km = ntdsc(i,j) - if ( dsc_disc_inv(i,j) == 1 ) then - !----------------------------------------------------- - ! Extrapolate water contents from level with max CF, - ! out of NTDSC and NTDSC-1 (ie near top of DSC), - ! to the top of the mixed layer - !----------------------------------------------------- - if (cf_dsc(i,j) > zero) then - kmax = km - if (cf(i,j,km-1) > cf(i,j,km)) kmax = km-1 - if ( l_check_ntp1 .and. cf(i,j,km+1) > cf(i,j,kmax) ) kmax = km+1 - - cfl_ml = cf_dsc(i,j)*cfl(i,j,kmax) & - /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) - cff_ml = cf_dsc(i,j)*cff(i,j,kmax) & - /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) - if (cfl_ml > 0.01_r_bl) qcl_ic_top(i,j) = qcl(i,j,kmax)/cfl_ml & - + ( zhsc(i,j)-z_tq(i,j,km) )*dqcldz(i,j,km) - if (cff_ml > 0.01_r_bl) qcf_ic_top(i,j) = qcf(i,j,kmax)/cff_ml & - + ( zhsc(i,j)-z_tq(i,j,km) )*dqcfdz(i,j,km) - - end if - - dqw = dqw_dsc(i,j) - dsl = dsl_dsc(i,j) - ! ignore any cloud above the inversion - dqcl = - cfl_ml*qcl_ic_top(i,j) - dqcf = - cff_ml*qcf_ic_top(i,j) + !----------------------------------------------------------------------- + ! 7.3 Calculation of other SML and DSC inputs to entr param. + ! If COUPLED then SML are not used as no "entrainment" is then + ! applied at ZH. + !----------------------------------------------------------------------- - db_disc = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & - (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & - (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) - - if ( db_disc > 0.03_r_bl ) then - ! Diagnosed inversion statically stable - db_dsct(i,j) = db_disc - else - ! Diagnosed inversion statically UNstable - ! Reset flag to use entrainment K (rather than fluxes) - dsc_disc_inv(i,j) = 0 - zhsc(i,j) = z_uv(i,j,ntdsc(i,j)+1) - end if - end if ! disc inversion diagnosed - - if ( dsc_disc_inv(i,j) == 0 ) then - ! Calculate using simple grid-level differences - kp = km+1 - dqw = qw(i,j,kp) - qw(i,j,km) - dsl = sl(i,j,kp) - sl(i,j,km) - qcl_ic_top(i,j) = qcl(i,j,km) - qcf_ic_top(i,j) = qcf(i,j,km) - dqcl = qcl(i,j,kp) - qcl_ic_top(i,j) - dqcf = qcf(i,j,kp) - qcf_ic_top(i,j) - db_dsct(i,j) = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & - (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & - (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) - end if ! no disc inversion diagnosed - - db_dsct_cld(i,j) = g * ( btm_cld(i,j,km)*dsl & - + bqm_cld(i,j,km)*dqw ) - denom = a_qsm(i,j,km)*dqw - a_dqsdtm(i,j,km)*dsl - if (abs(denom) > rbl_eps) then - chi_s_dsct(i,j) = -qcl_ic_top(i,j) / denom - chi_s_dsct(i,j) = max( zero, min( chi_s_dsct(i,j), one) ) - end if - - if ( db_dsct(i,j) < 0.003_r_bl ) then - ! Diagnosed inversion statically unstable: - ! ensure DB>0 so that entrainment is non-zero and - ! instability can be removed. - db_dsct(i,j) = 0.003_r_bl - db_dsct_cld(i,j) = zero ! set buoyancy reversal - chi_s_dsct(i,j) = zero ! term to zero - end if - end if ! test on DSC - - !----------------------------------------------------------------------- - ! 7.3 Calculation of other SML and DSC inputs to entr param. - ! If COUPLED then SML are not used as no "entrainment" is then - ! applied at ZH. - !----------------------------------------------------------------------- - - !------------------------------------------------------ - ! Calculation of SML inputs. - !------------------------------------------------------ - k = ntml(i,j) - kp2=min(k+1+sml_disc_inv(i,j),bl_levels) - cld_factor(i,j) = max( zero , cf_sml(i,j)-cf(i,j,kp2) ) - bt_top(i,j) = g * btm(i,j,k) - btt_top(i,j) = g * btm_cld(i,j,k) - btc_top(i,j) = btt_top(i,j) - !--------------------------------------------------- - ! Calculation of DSC inputs - !--------------------------------------------------- - if (dsc(i,j)) then - k = ntdsc(i,j) - kp2=min(k+1+dsc_disc_inv(i,j),bl_levels) - cld_factor_dsc(i,j) = max( zero , cf_dsc(i,j)-cf(i,j,kp2) ) - bt_dsct(i,j) = g * btm(i,j,k) - btt_dsct(i,j) = g * btm_cld(i,j,k) - end if - end do + !------------------------------------------------------ + ! Calculation of SML inputs. + !------------------------------------------------------ + k = ntml(i,j) + kp2=min(k+1+sml_disc_inv(i,j),bl_levels) + cld_factor(i,j) = max( zero , cf_sml(i,j)-cf(i,j,kp2) ) + bt_top(i,j) = g * btm(i,j,k) + btt_top(i,j) = g * btm_cld(i,j,k) + btc_top(i,j) = btt_top(i,j) + !--------------------------------------------------- + ! Calculation of DSC inputs + !--------------------------------------------------- + if (dsc(i,j)) then + k = ntdsc(i,j) + kp2=min(k+1+dsc_disc_inv(i,j),bl_levels) + cld_factor_dsc(i,j) = max( zero , cf_dsc(i,j)-cf(i,j,kp2) ) + bt_dsct(i,j) = g * btm(i,j,k) + btt_dsct(i,j) = g * btm_cld(i,j,k) + end if end do !$OMP end do +!end do + !----------------------------------------------------------------------- ! 7.4 Next those terms which depend on the presence of buoyancy reversal !----------------------------------------------------------------------- + +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - z_cld(i,j) = min( z_cld(i,j), zh(i,j) ) - z_cld_dsc(i,j) = min( z_cld_dsc(i,j), zhsc(i,j) ) - !--------------------------------------------------------------- - ! First the surface mixed layer. - !--------------------------------------------------------------- +do i = pdims%i_start, pdims%i_end + z_cld(i,j) = min( z_cld(i,j), zh(i,j) ) + z_cld_dsc(i,j) = min( z_cld_dsc(i,j), zhsc(i,j) ) + !--------------------------------------------------------------- + ! First the surface mixed layer. + !--------------------------------------------------------------- + if ( coupled(i,j) ) then + zeta_s(i,j) = one - z_cld_dsc(i,j) / zhsc(i,j) + zeta_r(i,j) = one - zc_dsc(i,j) / zhsc(i,j) + else + zeta_s(i,j) = one - z_cld(i,j) / zh(i,j) + zeta_r(i,j) = one - zc(i,j) / zh(i,j) + end if + + if (db_top_cld(i,j) >= zero) then + !-------------------------------------------------- + ! i.e. no buoyancy reversal (or default if COUPLED) + !-------------------------------------------------- + db_top_cld(i,j) = zero + d_siems(i,j) = zero + br_fback(i,j)= zero + else + !---------------------------- + ! if (DB_TOP_CLD(I,j) < 0.0) + ! i.e. buoyancy reversal + !---------------------------- + db_top_cld(i,j) = -db_top_cld(i,j) * cld_factor(i,j) + d_siems(i,j) = max( zero, & + chi_s_top(i,j) * db_top_cld(i,j) / (db_top(i,j)+rbl_eps) ) + ! Linear feedback dependence for D<0.1 + br_fback(i,j)= min( one, 10.0_r_bl*d_siems(i,j) ) + zeta_r(i,j) = zeta_r(i,j) + (one-zeta_r(i,j))*br_fback(i,j) + end if + !--------------------------------------------------------------- + ! Now the decoupled Sc layer (DSC). + !--------------------------------------------------------------- + if (dsc(i,j)) then if ( coupled(i,j) ) then - zeta_s(i,j) = one - z_cld_dsc(i,j) / zhsc(i,j) - zeta_r(i,j) = one - zc_dsc(i,j) / zhsc(i,j) + zeta_r_dsc(i,j) = one - zc_dsc(i,j) / zhsc(i,j) else - zeta_s(i,j) = one - z_cld(i,j) / zh(i,j) - zeta_r(i,j) = one - zc(i,j) / zh(i,j) + zeta_r_dsc(i,j) = one - zc_dsc(i,j) / dscdepth(i,j) end if - if (db_top_cld(i,j) >= zero) then - !-------------------------------------------------- - ! i.e. no buoyancy reversal (or default if COUPLED) - !-------------------------------------------------- - db_top_cld(i,j) = zero - d_siems(i,j) = zero - br_fback(i,j)= zero + if (db_dsct_cld(i,j) >= zero) then + !---------------------------- + ! i.e. no buoyancy reversal + !---------------------------- + db_dsct_cld(i,j) = zero + d_siems_dsc(i,j) = zero + br_fback_dsc(i,j)= zero else !---------------------------- - ! if (DB_TOP_CLD(I,j) < 0.0) + ! if (DB_DSCT_CLD(I,j) < 0.0) ! i.e. buoyancy reversal !---------------------------- - db_top_cld(i,j) = -db_top_cld(i,j) * cld_factor(i,j) - d_siems(i,j) = max( zero, & - chi_s_top(i,j) * db_top_cld(i,j) / (db_top(i,j)+rbl_eps) ) + db_dsct_cld(i,j) = -db_dsct_cld(i,j) * cld_factor_dsc(i,j) + d_siems_dsc(i,j) = max( zero, chi_s_dsct(i,j) & + * db_dsct_cld(i,j) / (db_dsct(i,j)+rbl_eps) ) ! Linear feedback dependence for D<0.1 - br_fback(i,j)= min( one, 10.0_r_bl*d_siems(i,j) ) - zeta_r(i,j) = zeta_r(i,j) + (one-zeta_r(i,j))*br_fback(i,j) - end if - !--------------------------------------------------------------- - ! Now the decoupled Sc layer (DSC). - !--------------------------------------------------------------- - if (dsc(i,j)) then - if ( coupled(i,j) ) then - zeta_r_dsc(i,j) = one - zc_dsc(i,j) / zhsc(i,j) - else - zeta_r_dsc(i,j) = one - zc_dsc(i,j) / dscdepth(i,j) + br_fback_dsc(i,j) = min( one, 10.0_r_bl*d_siems_dsc(i,j) ) + + if ( entr_enhance_by_cu == Buoyrev_feedback & + .and. cumulus(i,j) & + .and. d_siems_dsc(i,j) < 0.1_r_bl & + .and. d_siems_dsc(i,j) > rbl_eps ) then + ! Assume mixing from cumulus can enhance the + ! buoyancy reversal feedback in regime 00 below 400m, 1 above 1000m + cu_depth_fac = one_half*( one+ & + tanh( ((zhpar(i,j)-zh(i,j))-700.0_r_bl)/100.0_r_bl) ) + ! BR_FBACK = unchanged for Cu<400m, ->1 for Cu>1000. + br_fback_dsc(i,j) = cu_depth_fac + & + (one-cu_depth_fac)*br_fback_dsc(i,j) end if - if (db_dsct_cld(i,j) >= zero) then - !---------------------------- - ! i.e. no buoyancy reversal - !---------------------------- - db_dsct_cld(i,j) = zero - d_siems_dsc(i,j) = zero - br_fback_dsc(i,j)= zero - else - !---------------------------- - ! if (DB_DSCT_CLD(I,j) < 0.0) - ! i.e. buoyancy reversal - !---------------------------- - db_dsct_cld(i,j) = -db_dsct_cld(i,j) * cld_factor_dsc(i,j) - d_siems_dsc(i,j) = max( zero, chi_s_dsct(i,j) & - * db_dsct_cld(i,j) / (db_dsct(i,j)+rbl_eps) ) - ! Linear feedback dependence for D<0.1 - br_fback_dsc(i,j) = min( one, 10.0_r_bl*d_siems_dsc(i,j) ) - - if ( entr_enhance_by_cu == Buoyrev_feedback & - .and. cumulus(i,j) & - .and. d_siems_dsc(i,j) < 0.1_r_bl & - .and. d_siems_dsc(i,j) > rbl_eps ) then - ! Assume mixing from cumulus can enhance the - ! buoyancy reversal feedback in regime 00 below 400m, 1 above 1000m - cu_depth_fac = one_half*( one+ & - tanh( ((zhpar(i,j)-zh(i,j))-700.0_r_bl)/100.0_r_bl) ) - ! BR_FBACK = unchanged for Cu<400m, ->1 for Cu>1000. - br_fback_dsc(i,j) = cu_depth_fac + & - (one-cu_depth_fac)*br_fback_dsc(i,j) - end if - - zeta_r_dsc(i,j) = zeta_r_dsc(i,j) + & - (one-zeta_r_dsc(i,j))*br_fback_dsc(i,j) + zeta_r_dsc(i,j) = zeta_r_dsc(i,j) + & + (one-zeta_r_dsc(i,j))*br_fback_dsc(i,j) - end if end if - end do + end if end do !$OMP end do +! end do + !----------------------------------------------------------------------- ! 8. Calculate the radiative flux change across cloud top for mixed- @@ -3498,15 +3526,18 @@ subroutine kmkhz_9c ( & ! Initialise variables !------------------------------ + +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - k_cloud_top(i,j) = 0 - df_top_over_cp(i,j) = zero - df_inv_sml(i,j) = zero - end do +do i = pdims%i_start, pdims%i_end + + k_cloud_top(i,j) = 0 + df_top_over_cp(i,j) = zero + df_inv_sml(i,j) = zero end do !$OMP end do +! end do + if (l_new_kcloudtop) then !--------------------------------------------------------------------- @@ -3520,113 +3551,121 @@ subroutine kmkhz_9c ( & ! First find the level with maximum LW cooling, below z_rad_lim and ! in the upper half of the BL (ie, restrict search to `close' to ZH) !--------------------------------------------------------------------- -!$OMP do SCHEDULE(DYNAMIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - k_rad_lim = ntml(i,j)+1 - z_rad_lim = max( z_tq(i,j,k_rad_lim)+0.1_r_bl, 1.2_r_bl*zh(i,j) ) - k = 1 - do while (z_tq(i,j,k) < z_rad_lim .and. k < bl_levels) - if (dflw_over_cp(i,j,k) > df_top_over_cp(i,j) & - .and. z_tq(i,j,k) > one_half*zh(i,j) ) then - k_cloud_top(i,j) = k - df_top_over_cp(i,j) = dflw_over_cp(i,j,k) - end if - k = k + 1 - end do ! k - !----------------------------------------------------------------- - ! If DF(K_CLOUD_TOP+1) is less than double DF(K_CLOUD_TOP+2) we - ! assume DF(K_CLOUD_TOP+1) is actually typical of the free-trop and - ! that the current K_CLOUD_TOP must be the inversion grid-level. - ! Hence we lower K_CLOUD_TOP by one (it should mark the top of the - ! mixed layer and cloud-top radiative cooling within the invesion - ! grid-level will be included as DF_INV_SML below) - !----------------------------------------------------------------- - k = k_cloud_top(i,j) - if ( k > 1 .and. k < bl_levels -1 ) then - if (dflw_over_cp(i,j,k+1) < 1.5_r_bl*dflw_over_cp(i,j,k+2)) & - k_cloud_top(i,j) = k-1 + + ! do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(DYNAMIC) + do i = pdims%i_start, pdims%i_end + k_rad_lim = ntml(i,j)+1 + z_rad_lim = max( z_tq(i,j,k_rad_lim)+0.1_r_bl, 1.2_r_bl*zh(i,j) ) + k = 1 + do while (z_tq(i,j,k) < z_rad_lim .and. k < bl_levels) + if (dflw_over_cp(i,j,k) > df_top_over_cp(i,j) & + .and. z_tq(i,j,k) > one_half*zh(i,j) ) then + k_cloud_top(i,j) = k + df_top_over_cp(i,j) = dflw_over_cp(i,j,k) end if - end do ! i + k = k + 1 + end do ! k !----------------------------------------------------------------- - ! Find bottom grid-level (K_LEVEL) for cloud-top radiative fux - ! divergence: higher of base of LW radiatively cooled layer, - ! 0.5*ZH, since cooling must be in upper part of layer + ! If DF(K_CLOUD_TOP+1) is less than double DF(K_CLOUD_TOP+2) we + ! assume DF(K_CLOUD_TOP+1) is actually typical of the free-trop and + ! that the current K_CLOUD_TOP must be the inversion grid-level. + ! Hence we lower K_CLOUD_TOP by one (it should mark the top of the + ! mixed layer and cloud-top radiative cooling within the invesion + ! grid-level will be included as DF_INV_SML below) !----------------------------------------------------------------- - do i = pdims%i_start, pdims%i_end - k_level(i,j) = k_cloud_top(i,j) - if ( k_cloud_top(i,j) > 1 ) then - k_rad_lim = 1 - k=k_cloud_top(i,j)-1 - kl=max(1,k) ! only to avoid out-of-bounds compiler warning - do while ( k > k_rad_lim & - .and. dflw_over_cp(i,j,kl) > zero & - .and. z_tq(i,j,kl) > one_half*zh(i,j) ) - k_level(i,j) = k - k = k-1 - kl=max(1,k) - - end do ! k - end if - end do ! i - end do ! j -!$OMP end do + k = k_cloud_top(i,j) + if ( k > 1 .and. k < bl_levels -1 ) then + if (dflw_over_cp(i,j,k+1) < 1.5_r_bl*dflw_over_cp(i,j,k+2)) & + k_cloud_top(i,j) = k-1 + end if + end do ! i + !$OMP end do + !----------------------------------------------------------------- + ! Find bottom grid-level (K_LEVEL) for cloud-top radiative fux + ! divergence: higher of base of LW radiatively cooled layer, + ! 0.5*ZH, since cooling must be in upper part of layer + !----------------------------------------------------------------- + !$OMP do SCHEDULE(DYNAMIC) + do i = pdims%i_start, pdims%i_end + k_level(i,j) = k_cloud_top(i,j) + if ( k_cloud_top(i,j) > 1 ) then + k_rad_lim = 1 + k=k_cloud_top(i,j)-1 + kl=max(1,k) ! only to avoid out-of-bounds compiler warning + do while ( k > k_rad_lim & + .and. dflw_over_cp(i,j,kl) > zero & + .and. z_tq(i,j,kl) > one_half*zh(i,j) ) + k_level(i,j) = k + k = k-1 + kl=max(1,k) + + end do ! k + end if + end do ! i + !$OMP end do + !end do ! j + else ! original method of finding the k_cloud_dsct, the top of the mixed layer ! as seen by radiation, found to be resolution dependent -!$OMP do SCHEDULE(DYNAMIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - ! restrict search to `close' to ZH - k_rad_lim = ntml(i,j)+1 - do k = 1, min(bl_levels,k_rad_lim) - !------------------------------------------------------------- - ! Find the layer below K_RAD_LIM with the greatest LW - ! radiative flux jump in the upper half of the BL - ! and assume that this is the top of the SML. - !------------------------------------------------------------- - if (dflw_over_cp(i,j,k) > df_top_over_cp(i,j) & - .and. z_tq(i,j,k) > one_half*zh(i,j) ) then - k_cloud_top(i,j) = k - if ( k > 1 ) then - ! Set K_CLOUD_TOP to the level below if its DF is - ! greater than half the maximum. DF in level - ! K_CLOUD_TOP+1 is then included as DF_INV_SML below. - if (dflw_over_cp(i,j,k-1) > one_half*dflw_over_cp(i,j,k)) & - k_cloud_top(i,j) = k-1 - end if - df_top_over_cp(i,j) = dflw_over_cp(i,j,k) + + !do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(DYNAMIC) + do i = pdims%i_start, pdims%i_end + ! restrict search to `close' to ZH + k_rad_lim = ntml(i,j)+1 + do k = 1, min(bl_levels,k_rad_lim) + !------------------------------------------------------------- + ! Find the layer below K_RAD_LIM with the greatest LW + ! radiative flux jump in the upper half of the BL + ! and assume that this is the top of the SML. + !------------------------------------------------------------- + if (dflw_over_cp(i,j,k) > df_top_over_cp(i,j) & + .and. z_tq(i,j,k) > one_half*zh(i,j) ) then + k_cloud_top(i,j) = k + if ( k > 1 ) then + ! Set K_CLOUD_TOP to the level below if its DF is + ! greater than half the maximum. DF in level + ! K_CLOUD_TOP+1 is then included as DF_INV_SML below. + if (dflw_over_cp(i,j,k-1) > one_half*dflw_over_cp(i,j,k)) & + k_cloud_top(i,j) = k-1 end if + df_top_over_cp(i,j) = dflw_over_cp(i,j,k) + end if - end do ! k - end do ! i + end do ! k + end do ! i + !$OMP end do - !----------------------------------------------------------------- - ! Find bottom grid-level (K_LEVEL) for cloud-top radiative fux - ! divergence: higher of base of LW radiatively cooled layer, - ! 0.5*ZH, since cooling must be in upper part of layer - !----------------------------------------------------------------- - do i = pdims%i_start, pdims%i_end - k_level(i,j) = k_cloud_top(i,j) - if ( k_cloud_top(i,j) > 1 ) then - k_rad_lim = 1 - k=k_cloud_top(i,j)-1 - kl=max(1,k) ! only to avoid out-of-bounds compiler warning - do while ( k > k_rad_lim & - .and. dflw_over_cp(i,j,kl) > zero & - .and. z_tq(i,j,kl) > one_half*zh(i,j) ) - k_level(i,j) = k - k = k-1 - kl=max(1,k) + !----------------------------------------------------------------- + ! Find bottom grid-level (K_LEVEL) for cloud-top radiative fux + ! divergence: higher of base of LW radiatively cooled layer, + ! 0.5*ZH, since cooling must be in upper part of layer + !----------------------------------------------------------------- + !$OMP do SCHEDULE(DYNAMIC) + do i = pdims%i_start, pdims%i_end + k_level(i,j) = k_cloud_top(i,j) + if ( k_cloud_top(i,j) > 1 ) then + k_rad_lim = 1 + k=k_cloud_top(i,j)-1 + kl=max(1,k) ! only to avoid out-of-bounds compiler warning + do while ( k > k_rad_lim & + .and. dflw_over_cp(i,j,kl) > zero & + .and. z_tq(i,j,kl) > one_half*zh(i,j) ) + k_level(i,j) = k + k = k-1 + kl=max(1,k) - end do - end if - end do ! i - end do ! j -!$OMP end do + end do + end if + end do ! i + !$OMP end do +!end do ! j + end if ! test on l_new_kcloudtop @@ -3639,52 +3678,54 @@ subroutine kmkhz_9c ( & ! `clear-air' part from the grid-level divergence. !----------------------------------------------------------------- -!$OMP do SCHEDULE(DYNAMIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( k_cloud_top(i,j) > 0 ) then - dflw_inv = zero - dfsw_inv = zero - if ( k_cloud_top(i,j) < bl_levels ) then - k = k_cloud_top(i,j)+1 - if ( k < bl_levels ) then - dflw_inv = dflw_over_cp(i,j,k) & - - dflw_over_cp(i,j,k+1) & - * dzl(i,j,k)/dzl(i,j,k+1) - dfsw_inv = dfsw_over_cp(i,j,k) & - - dfsw_over_cp(i,j,k+1) & - * dzl(i,j,k)/dzl(i,j,k+1) - else - dflw_inv = dflw_over_cp(i,j,k) - dfsw_inv = dfsw_over_cp(i,j,k) - end if - dflw_inv = max( dflw_inv, zero ) - dfsw_inv = min( dfsw_inv, zero ) +!do j = pdims%j_start, pdims%j_end +!$OMP do SCHEDULE(DYNAMIC) +do i = pdims%i_start, pdims%i_end + + if ( k_cloud_top(i,j) > 0 ) then + dflw_inv = zero + dfsw_inv = zero + if ( k_cloud_top(i,j) < bl_levels ) then + k = k_cloud_top(i,j)+1 + if ( k < bl_levels ) then + dflw_inv = dflw_over_cp(i,j,k) & + - dflw_over_cp(i,j,k+1) & + * dzl(i,j,k)/dzl(i,j,k+1) + dfsw_inv = dfsw_over_cp(i,j,k) & + - dfsw_over_cp(i,j,k+1) & + * dzl(i,j,k)/dzl(i,j,k+1) + else + dflw_inv = dflw_over_cp(i,j,k) + dfsw_inv = dfsw_over_cp(i,j,k) end if - df_inv_sml(i,j) = dflw_inv + dfsw_inv - - df_top_over_cp(i,j) = frad_lw(i,j,k_cloud_top(i,j)+1) & - - frad_lw(i,j,k_level(i,j)) & - + dflw_inv - - dfsw_top = frad_sw(i,j,k_cloud_top(i,j)+1) & - - frad_sw(i,j,k_level(i,j)) & - + dfsw_inv - - !----------------------------------------------------------- - ! Combine SW and LW cloud-top divergences into a net - ! divergence by estimating SW flux divergence at a given - ! LW divergence = DF_SW * (1-exp{-A*kappa_sw/kappa_lw}) - ! Empirically (from LEM data) a reasonable fit is found - ! with A small and (1-exp{-A*kappa_sw/kappa_lw}) = dfsw_frac - !----------------------------------------------------------- - df_top_over_cp(i,j) = max( zero, & - df_top_over_cp(i,j) + dfsw_frac * dfsw_top ) + dflw_inv = max( dflw_inv, zero ) + dfsw_inv = min( dfsw_inv, zero ) end if - end do + df_inv_sml(i,j) = dflw_inv + dfsw_inv + + df_top_over_cp(i,j) = frad_lw(i,j,k_cloud_top(i,j)+1) & + - frad_lw(i,j,k_level(i,j)) & + + dflw_inv + + dfsw_top = frad_sw(i,j,k_cloud_top(i,j)+1) & + - frad_sw(i,j,k_level(i,j)) & + + dfsw_inv + + !----------------------------------------------------------- + ! Combine SW and LW cloud-top divergences into a net + ! divergence by estimating SW flux divergence at a given + ! LW divergence = DF_SW * (1-exp{-A*kappa_sw/kappa_lw}) + ! Empirically (from LEM data) a reasonable fit is found + ! with A small and (1-exp{-A*kappa_sw/kappa_lw}) = dfsw_frac + !----------------------------------------------------------- + df_top_over_cp(i,j) = max( zero, & + df_top_over_cp(i,j) + dfsw_frac * dfsw_top ) + end if end do !$OMP end do +!end do + ! ------------------------------------------------------------------ ! 9. Calculate the non-turbulent fluxes at the layer boundaries. @@ -3703,51 +3744,55 @@ subroutine kmkhz_9c ( & ! K_CLOUD_TOP and K_CLOUD_DSCT to top level in mixed layer ! ------------------------------------------------------------------ + +! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( k_cloud_top(i,j) == 0 ) k_cloud_top(i,j) = ntml(i,j) - - ft_nt_zh(i,j) = frad(i,j,k_cloud_top(i,j)+1) & - + df_inv_sml(i,j) - ft_nt_zh(i,j) = ft_nt_zh(i,j) + fmic(i,j,ntml(i,j)+2,1) & - + fsubs(i,j,ntml(i,j),1) - fq_nt_zh(i,j) = fmic(i,j,ntml(i,j)+2,2) & - + fsubs(i,j,ntml(i,j),2) - - ft_nt_zhsc(i,j) = zero - ft_nt_zhsc(i,j) = zero - fq_nt_zhsc(i,j) = zero - if ( dsc(i,j) ) then - if ( k_cloud_dsct(i,j) == 0 ) k_cloud_dsct(i,j) = ntdsc(i,j) - ft_nt_zhsc(i,j) = frad(i,j,k_cloud_dsct(i,j)+1) & - + df_inv_dsc(i,j) - ft_nt_zhsc(i,j) = ft_nt_zhsc(i,j) + fmic(i,j,ntdsc(i,j)+2,1) & - + fsubs(i,j,ntdsc(i,j),1) - fq_nt_zhsc(i,j) = fmic(i,j,ntdsc(i,j)+2,2) & - + fsubs(i,j,ntdsc(i,j),2) - end if - end do +do i = pdims%i_start, pdims%i_end + if ( k_cloud_top(i,j) == 0 ) k_cloud_top(i,j) = ntml(i,j) + + ft_nt_zh(i,j) = frad(i,j,k_cloud_top(i,j)+1) & + + df_inv_sml(i,j) + ft_nt_zh(i,j) = ft_nt_zh(i,j) + fmic(i,j,ntml(i,j)+2,1) & + + fsubs(i,j,ntml(i,j),1) + fq_nt_zh(i,j) = fmic(i,j,ntml(i,j)+2,2) & + + fsubs(i,j,ntml(i,j),2) + + ft_nt_zhsc(i,j) = zero + ft_nt_zhsc(i,j) = zero + fq_nt_zhsc(i,j) = zero + if ( dsc(i,j) ) then + if ( k_cloud_dsct(i,j) == 0 ) k_cloud_dsct(i,j) = ntdsc(i,j) + ft_nt_zhsc(i,j) = frad(i,j,k_cloud_dsct(i,j)+1) & + + df_inv_dsc(i,j) + ft_nt_zhsc(i,j) = ft_nt_zhsc(i,j) + fmic(i,j,ntdsc(i,j)+2,1) & + + fsubs(i,j,ntdsc(i,j),1) + fq_nt_zhsc(i,j) = fmic(i,j,ntdsc(i,j)+2,2) & + + fsubs(i,j,ntdsc(i,j),2) + end if end do !$OMP end do NOWAIT +! end do + ! Repeat for water tracers if (l_wtrac) then do i_wt = 1, n_wtrac -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - fq_nt_zh_wtrac(i,j,i_wt) = fmic_wtrac(i,j,ntml(i,j)+2,i_wt) & - + fsubs_wtrac(i,j,ntml(i,j),i_wt) - fq_nt_zhsc_wtrac(i,j,i_wt) = zero - if ( dsc(i,j) ) then - fq_nt_zhsc_wtrac(i,j,i_wt) = fmic_wtrac(i,j,ntdsc(i,j)+2,i_wt) & - + fsubs_wtrac(i,j,ntdsc(i,j),i_wt) - end if - end do + ! do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + fq_nt_zh_wtrac(i,j,i_wt) = fmic_wtrac(i,j,ntml(i,j)+2,i_wt) & + + fsubs_wtrac(i,j,ntml(i,j),i_wt) + + fq_nt_zhsc_wtrac(i,j,i_wt) = zero + if ( dsc(i,j) ) then + fq_nt_zhsc_wtrac(i,j,i_wt) = fmic_wtrac(i,j,ntdsc(i,j)+2,i_wt) & + + fsubs_wtrac(i,j,ntdsc(i,j),i_wt) + end if end do -!$OMP end do NOWAIT + !$OMP end do NOWAIT + ! end do + end do end if @@ -3755,15 +3800,17 @@ subroutine kmkhz_9c ( & ! 10. Subroutine EXCF_NL. !----------------------------------------------------------------------- + +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - ntml_save(i,j) = ntml(i,j) ! needed to identify changes - dsc_save(i,j) = dsc(i,j) ! in excf_nl - dsc_removed(i,j) = 0 - end do +do i = pdims%i_start, pdims%i_end + ntml_save(i,j) = ntml(i,j) ! needed to identify changes + dsc_save(i,j) = dsc(i,j) ! in excf_nl + dsc_removed(i,j) = 0 end do !$OMP end do NOWAIT +!end do + !$OMP end PARALLEL @@ -3790,157 +3837,165 @@ subroutine kmkhz_9c ( & rhof2,rhofsc,f_ngstress,tke_nl,zdsc_base,nbdsc & ) +!do j = pdims%j_start, pdims%j_end !$OMP PARALLEL DEFAULT(SHARED) & -!$OMP private (i, j, i_wt, k, kl, kp, c_ws, c_tke, w_m, tothf_efl, totqf_efl, & +!$OMP private (i, i_wt, k, kl, kp, c_ws, c_tke, w_m, tothf_efl, totqf_efl, & !$OMP ml_tend, fa_tend, inv_tend, Prandtl, svl_lapse_rho, & !$OMP recip_svl_lapse, rhok_inv, svl_lapse, svl_target, svl_flux) - !----------------------------------------------------------------------- !-adjust SML/DSC properties depending on diagnoses in EXCF_NL ! Note that the non-turbulent fluxes at inversions will have been ! swapped in EXCF_NL (ie. FT/Q_NT_ZH/ZHSC) !----------------------------------------------------------------------- !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( dsc(i,j) .and. .not. dsc_save(i,j) ) then - !..decoupling diagnosed in EXCF_NL - change parameters around - dsl_dsc(i,j) = dsl_sml(i,j) - dqw_dsc(i,j) = dqw_sml(i,j) - db_dsct(i,j) = db_top(i,j) ! copy diagnostics across - zc_dsc(i,j) = zc(i,j) ! - dsc_disc_inv(i,j) = sml_disc_inv(i,j) - sml_disc_inv(i,j) = 0 - dsl_sml(i,j) = zero - dqw_sml(i,j) = zero - df_inv_dsc(i,j) = df_inv_sml(i,j) - df_inv_sml(i,j) = zero - res_inv(i,j) = 0 ! not clear what to do at dsc top (dzh diagnosed - ! assuming well-mixed) so do nothing for now! - dzh(i,j) = rmdi ! don't want to associate dzh with new zh - end if - end do +do i = pdims%i_start, pdims%i_end + if ( dsc(i,j) .and. .not. dsc_save(i,j) ) then + !..decoupling diagnosed in EXCF_NL - change parameters around + dsl_dsc(i,j) = dsl_sml(i,j) + dqw_dsc(i,j) = dqw_sml(i,j) + db_dsct(i,j) = db_top(i,j) ! copy diagnostics across + zc_dsc(i,j) = zc(i,j) ! + dsc_disc_inv(i,j) = sml_disc_inv(i,j) + sml_disc_inv(i,j) = 0 + dsl_sml(i,j) = zero + dqw_sml(i,j) = zero + df_inv_dsc(i,j) = df_inv_sml(i,j) + df_inv_sml(i,j) = zero + res_inv(i,j) = 0 ! not clear what to do at dsc top (dzh diagnosed + ! assuming well-mixed) so do nothing for now! + dzh(i,j) = rmdi ! don't want to associate dzh with new zh + end if end do !$OMP end do +!end do + ! Repeat for water tracers if (l_wtrac) then do i_wt = 1, n_wtrac -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( dsc(i,j) .and. .not. dsc_save(i,j) ) then - !..decoupling diagnosed in EXCF_NL - change parameters around - dqw_dsc_wtrac(i,j,i_wt) = dqw_sml_wtrac(i,j,i_wt) - dqw_sml_wtrac(i,j,i_wt) = zero - end if - end do + + ! do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + if ( dsc(i,j) .and. .not. dsc_save(i,j) ) then + !..decoupling diagnosed in EXCF_NL - change parameters around + dqw_dsc_wtrac(i,j,i_wt) = dqw_sml_wtrac(i,j,i_wt) + dqw_sml_wtrac(i,j,i_wt) = zero + end if end do -!$OMP end do + !$OMP end do + ! end do + end do end if if ( l_use_sml_dsc_fixes ) then -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( dsc_removed(i,j) == 1 ) then - ! decoupled layer removed in EXCF_NL because it had no - ! turbulence forcing - dsl_dsc(i,j) = zero - dqw_dsc(i,j) = zero - dsc_disc_inv(i,j) = 0 - df_inv_dsc(i,j) = zero - else if ( dsc_removed(i,j) == 2 ) then - ! decoupled layer recoupled with surface layer - dsl_sml(i,j) = dsl_dsc(i,j) - dqw_sml(i,j) = dqw_dsc(i,j) - dsl_dsc(i,j) = zero - dqw_dsc(i,j) = zero - sml_disc_inv(i,j) = dsc_disc_inv(i,j) - dsc_disc_inv(i,j) = 0 - df_inv_sml(i,j) = df_inv_dsc(i,j) - df_inv_dsc(i,j) = zero - res_inv(i,j) = 0 ! dzh was diagnosed for a capping inversion - dzh(i,j) = rmdi ! subsumed into mixed layer so remove its flags - end if - end do + + ! do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + if ( dsc_removed(i,j) == 1 ) then + ! decoupled layer removed in EXCF_NL because it had no + ! turbulence forcing + dsl_dsc(i,j) = zero + dqw_dsc(i,j) = zero + dsc_disc_inv(i,j) = 0 + df_inv_dsc(i,j) = zero + else if ( dsc_removed(i,j) == 2 ) then + ! decoupled layer recoupled with surface layer + dsl_sml(i,j) = dsl_dsc(i,j) + dqw_sml(i,j) = dqw_dsc(i,j) + dsl_dsc(i,j) = zero + dqw_dsc(i,j) = zero + sml_disc_inv(i,j) = dsc_disc_inv(i,j) + dsc_disc_inv(i,j) = 0 + df_inv_sml(i,j) = df_inv_dsc(i,j) + df_inv_dsc(i,j) = zero + res_inv(i,j) = 0 ! dzh was diagnosed for a capping inversion + dzh(i,j) = rmdi ! subsumed into mixed layer so remove its flags + end if end do -!$OMP end do + !$OMP end do + ! end do + ! Repeat for water tracers if (l_wtrac) then do i_wt = 1, n_wtrac -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( dsc_removed(i,j) == 1 ) then - ! decoupled layer removed in EXCF_NL because it had no - ! turbulence forcing - dqw_dsc_wtrac(i,j,i_wt) = zero - else if ( dsc_removed(i,j) == 2 ) then - ! decoupled layer recoupled with surface layer - dqw_sml_wtrac(i,j,i_wt) = dqw_dsc_wtrac(i,j,i_wt) - dqw_dsc_wtrac(i,j,i_wt) = zero - end if - end do + !do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + if ( dsc_removed(i,j) == 1 ) then + ! decoupled layer removed in EXCF_NL because it had no + ! turbulence forcing + dqw_dsc_wtrac(i,j,i_wt) = zero + else if ( dsc_removed(i,j) == 2 ) then + ! decoupled layer recoupled with surface layer + dqw_sml_wtrac(i,j,i_wt) = dqw_dsc_wtrac(i,j,i_wt) + dqw_dsc_wtrac(i,j,i_wt) = zero + end if end do -!$OMP end do + !$OMP end do + !end do end do end if else ! not l_use_sml_dsc_fixes -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( .not. dsc(i,j) .and. dsc_save(i,j) ) then - !..decoupled layer removed in EXCF_NL; either... - if ( ntml_save(i,j) == ntml(i,j) ) then - !...had no turbulence forcing - dsl_dsc(i,j) = zero - dqw_dsc(i,j) = zero - dsc_disc_inv(i,j) = 0 - df_inv_dsc(i,j) = zero - else - !...recoupled with surface layer - dsl_sml(i,j) = dsl_dsc(i,j) - dqw_sml(i,j) = dqw_dsc(i,j) - dsl_dsc(i,j) = zero - dqw_dsc(i,j) = zero - sml_disc_inv(i,j) = dsc_disc_inv(i,j) - dsc_disc_inv(i,j) = 0 - df_inv_sml(i,j) = df_inv_dsc(i,j) - df_inv_dsc(i,j) = zero - res_inv(i,j) = 0 ! dzh was diagnosed for a capping inversion - dzh(i,j) = rmdi ! subsumed into mixed layer so remove its flags - end if + + !do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + if ( .not. dsc(i,j) .and. dsc_save(i,j) ) then + !..decoupled layer removed in EXCF_NL; either... + if ( ntml_save(i,j) == ntml(i,j) ) then + !...had no turbulence forcing + dsl_dsc(i,j) = zero + dqw_dsc(i,j) = zero + dsc_disc_inv(i,j) = 0 + df_inv_dsc(i,j) = zero + else + !...recoupled with surface layer + dsl_sml(i,j) = dsl_dsc(i,j) + dqw_sml(i,j) = dqw_dsc(i,j) + dsl_dsc(i,j) = zero + dqw_dsc(i,j) = zero + sml_disc_inv(i,j) = dsc_disc_inv(i,j) + dsc_disc_inv(i,j) = 0 + df_inv_sml(i,j) = df_inv_dsc(i,j) + df_inv_dsc(i,j) = zero + res_inv(i,j) = 0 ! dzh was diagnosed for a capping inversion + dzh(i,j) = rmdi ! subsumed into mixed layer so remove its flags end if - end do + end if end do -!$OMP end do + !$OMP end do + !end do + ! Repeat for water tracers if (l_wtrac) then do i_wt = 1, n_wtrac -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( .not. dsc(i,j) .and. dsc_save(i,j) ) then - !..decoupled layer removed in EXCF_NL; either... - if ( ntml_save(i,j) == ntml(i,j) ) then - !...had no turbulence forcing - dqw_dsc_wtrac(i,j,i_wt) = zero - else - !...recoupled with surface layer - dqw_sml_wtrac(i,j,i_wt) = dqw_dsc_wtrac(i,j,i_wt) - dqw_dsc_wtrac(i,j,i_wt) = zero - end if + + !do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + if ( .not. dsc(i,j) .and. dsc_save(i,j) ) then + !..decoupled layer removed in EXCF_NL; either... + if ( ntml_save(i,j) == ntml(i,j) ) then + !...had no turbulence forcing + dqw_dsc_wtrac(i,j,i_wt) = zero + else + !...recoupled with surface layer + dqw_sml_wtrac(i,j,i_wt) = dqw_dsc_wtrac(i,j,i_wt) + dqw_dsc_wtrac(i,j,i_wt) = zero end if - end do + end if end do -!$OMP end do + !$OMP end do + !end do + end do end if @@ -3952,22 +4007,24 @@ subroutine kmkhz_9c ( & ! Calculate the non-turbulent fluxes at the DSC base ! ------------------------------------------------------------------ + +! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - ft_nt_dscb(i,j) = ft_nt(i,j,1) - if ( nbdsc(i,j) > 1 ) then - k = nbdsc(i,j) ! NBDSC marks the lowest flux-level - ! within the DSC layer - ! Interpolate non-turb flux to base - ! of DSC layer: - ft_nt_dscb(i,j) = ft_nt(i,j,k-1) + & - (ft_nt(i,j,k)-ft_nt(i,j,k-1)) & - *(zdsc_base(i,j)-z_uv(i,j,k-1))/dzl(i,j,k-1) - end if - end do +do i = pdims%i_start, pdims%i_end + ft_nt_dscb(i,j) = ft_nt(i,j,1) + if ( nbdsc(i,j) > 1 ) then + k = nbdsc(i,j) ! NBDSC marks the lowest flux-level + ! within the DSC layer + ! Interpolate non-turb flux to base + ! of DSC layer: + ft_nt_dscb(i,j) = ft_nt(i,j,k-1) + & + (ft_nt(i,j,k)-ft_nt(i,j,k-1)) & + *(zdsc_base(i,j)-z_uv(i,j,k-1))/dzl(i,j,k-1) + end if end do !$OMP end do NOWAIT +! end do + !----------------------------------------------------------------------- !..Specify entrainment fluxes at NTML+1 and NTDSC+1 directly through FTL @@ -3993,103 +4050,105 @@ subroutine kmkhz_9c ( & !..ie. the inversion is well-defined) !----------------------------------------------------------------------- + +! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end +do i = pdims%i_start, pdims%i_end - zh_np1(i,j) = zero - t_frac(i,j) = zero - zrzi(i,j) = zero - we_rho(i,j) = zero - tothf_zh(i,j) = zero - totqf_zh(i,j) = zero - k=ntml(i,j)+1 + zh_np1(i,j) = zero + t_frac(i,j) = zero + zrzi(i,j) = zero + we_rho(i,j) = zero + tothf_zh(i,j) = zero + totqf_zh(i,j) = zero + k=ntml(i,j)+1 - ! Only RHOKH_ENT is passed out of EXCFNL so recalculate WE: - we_parm(i,j) = rdz(i,j,k)* & - ( rhokh_top_ent(i,j)+rhokh_surf_ent(i,j) ) & - / rho_mix(i,j,k) + ! Only RHOKH_ENT is passed out of EXCFNL so recalculate WE: + we_parm(i,j) = rdz(i,j,k)* & + ( rhokh_top_ent(i,j)+rhokh_surf_ent(i,j) ) & + / rho_mix(i,j,k) - if ( sml_disc_inv(i,j) == 1 .and. .not. coupled(i,j) .and. & - (rhokh_top_ent(i,j)+rhokh_surf_ent(i,j)) > zero ) then + if ( sml_disc_inv(i,j) == 1 .and. .not. coupled(i,j) .and. & + (rhokh_top_ent(i,j)+rhokh_surf_ent(i,j)) > zero ) then - !----------------------------------------------------------------- - !..Calculate ZH at end of timestep, ZH_NP1 - !----------------------------------------------------------------- - !..linearly interpolate vertical velocity to ZH - if ( zh(i,j) >= z_tq(i,j,k) ) then - w_ls(i,j) = w(i,j,k) + ( w(i,j,k+1) - w(i,j,k) ) & - * (zh(i,j)-z_tq(i,j,k)) * rdz(i,j,k+1) - else - w_ls(i,j) = w(i,j,k) + ( w(i,j,k) - w(i,j,k-1) ) & - * (zh(i,j)-z_tq(i,j,k)) * rdz(i,j,k) - end if - w_ls(i,j) = min ( w_ls(i,j), zero ) - ! only interested in subsidence - - zh_np1(i,j) = zh(i,j) + & - timestep * ( we_parm(i,j) + w_ls(i,j) ) - zh_np1(i,j) = max( zh_np1(i,j), z_uv(i,j,k-1) ) - if ( zh_np1(i,j) > z_top(i,j,k+1) ) then - ! limit ZH and W_e (and therefore the entraiment fluxes) - ! because the inversion cannot rise more than one level - ! in a timestep. - zh_np1(i,j) = z_top(i,j,k+1) - we_parm(i,j) = & - (z_top(i,j,k+1) - zh(i,j))/timestep - w_ls(i,j) - end if - !----------------------------------------------------------------- - !..Decide on which grid-level to apply entrainment flux - !----------------------------------------------------------------- - if ( zh_np1(i,j) > z_uv(i,j,ntml(i,j)+2) ) then - ! ZH risen above level K+1 so specify appropriate flux - ! at this level and raise NTML by one (this means - ! gradient-adjustment is also applied at half-level - ! old_NTML+1). Note KH profiles should already be - ! calculated at level NTML+1 because ZH is above this level. - ntml(i,j) = ntml(i,j) + 1 - k=ntml(i,j)+1 - sml_disc_inv(i,j)=2 - - ! T_FRAC is fraction of timestep inversion is above - ! the entrainment flux grid-level (at Z_UV(K)) - t_frac(i,j) = (zh_np1(i,j)-z_uv(i,j,k)) / & - (zh_np1(i,j)-zh(i,j)) - ! ZH_FRAC is the timestep-average fraction of mixed layer - ! air in the inversion grid-level, level NTML+1 - zh_frac(i,j) = one_half*t_frac(i,j)*(zh_np1(i,j)-z_uv(i,j,k) ) & - / dzl(i,j,k) - - else if ( zh_np1(i,j) >= z_uv(i,j,ntml(i,j)+1) ) then - ! ZH always between half-levels NTML+1 and NTML+2 - - t_frac(i,j) = one - zh_frac(i,j) = ( one_half*(zh(i,j)+zh_np1(i,j)) - z_uv(i,j,k) ) & - / dzl(i,j,k) + !----------------------------------------------------------------- + !..Calculate ZH at end of timestep, ZH_NP1 + !----------------------------------------------------------------- + !..linearly interpolate vertical velocity to ZH + if ( zh(i,j) >= z_tq(i,j,k) ) then + w_ls(i,j) = w(i,j,k) + ( w(i,j,k+1) - w(i,j,k) ) & + * (zh(i,j)-z_tq(i,j,k)) * rdz(i,j,k+1) + else + w_ls(i,j) = w(i,j,k) + ( w(i,j,k) - w(i,j,k-1) ) & + * (zh(i,j)-z_tq(i,j,k)) * rdz(i,j,k) + end if + w_ls(i,j) = min ( w_ls(i,j), zero ) + ! only interested in subsidence + + zh_np1(i,j) = zh(i,j) + & + timestep * ( we_parm(i,j) + w_ls(i,j) ) + zh_np1(i,j) = max( zh_np1(i,j), z_uv(i,j,k-1) ) + if ( zh_np1(i,j) > z_top(i,j,k+1) ) then + ! limit ZH and W_e (and therefore the entraiment fluxes) + ! because the inversion cannot rise more than one level + ! in a timestep. + zh_np1(i,j) = z_top(i,j,k+1) + we_parm(i,j) = & + (z_top(i,j,k+1) - zh(i,j))/timestep - w_ls(i,j) + end if + !----------------------------------------------------------------- + !..Decide on which grid-level to apply entrainment flux + !----------------------------------------------------------------- + if ( zh_np1(i,j) > z_uv(i,j,ntml(i,j)+2) ) then + ! ZH risen above level K+1 so specify appropriate flux + ! at this level and raise NTML by one (this means + ! gradient-adjustment is also applied at half-level + ! old_NTML+1). Note KH profiles should already be + ! calculated at level NTML+1 because ZH is above this level. + ntml(i,j) = ntml(i,j) + 1 + k=ntml(i,j)+1 + sml_disc_inv(i,j)=2 + + ! T_FRAC is fraction of timestep inversion is above + ! the entrainment flux grid-level (at Z_UV(K)) + t_frac(i,j) = (zh_np1(i,j)-z_uv(i,j,k)) / & + (zh_np1(i,j)-zh(i,j)) + ! ZH_FRAC is the timestep-average fraction of mixed layer + ! air in the inversion grid-level, level NTML+1 + zh_frac(i,j) = one_half*t_frac(i,j)*(zh_np1(i,j)-z_uv(i,j,k) ) & + / dzl(i,j,k) + + else if ( zh_np1(i,j) >= z_uv(i,j,ntml(i,j)+1) ) then + ! ZH always between half-levels NTML+1 and NTML+2 + + t_frac(i,j) = one + zh_frac(i,j) = ( one_half*(zh(i,j)+zh_np1(i,j)) - z_uv(i,j,k) ) & + / dzl(i,j,k) - else - ! ZH falls below half-level NTML+1 - ! Keep implicit (diffusive) entrainment but apply - ! at the level below - if (ntml(i,j) >= 2) then ! ftl(k=1) is surface flux - ntml(i,j) = ntml(i,j) - 1 - k=ntml(i,j)+1 - rhokh_top(i,j,k+1) = zero ! also need to remove diffusion - rhokh(i,j,k+1) = zero ! at old entrainment grid-level - end if - t_frac(i,j) = zero - zh_frac(i,j) = zero - sml_disc_inv(i,j) = 0 + else + ! ZH falls below half-level NTML+1 + ! Keep implicit (diffusive) entrainment but apply + ! at the level below + if (ntml(i,j) >= 2) then ! ftl(k=1) is surface flux + ntml(i,j) = ntml(i,j) - 1 + k=ntml(i,j)+1 + rhokh_top(i,j,k+1) = zero ! also need to remove diffusion + rhokh(i,j,k+1) = zero ! at old entrainment grid-level + end if + t_frac(i,j) = zero + zh_frac(i,j) = zero + sml_disc_inv(i,j) = 0 - end if ! test on where to apply entrainment flux + end if ! test on where to apply entrainment flux - we_rho(i,j) = rho_mix(i,j,k) * we_parm(i,j) - zrzi(i,j) = z_uv(i,j,k)*2.0_r_bl/(zh(i,j)+zh_np1(i,j)) + we_rho(i,j) = rho_mix(i,j,k) * we_parm(i,j) + zrzi(i,j) = z_uv(i,j,k)*2.0_r_bl/(zh(i,j)+zh_np1(i,j)) - end if ! test on SML_DISC_INV, etc - end do + end if ! test on SML_DISC_INV, etc end do !$OMP end do NOWAIT +!end do + !----------------------------------------------------------------------- !..Linearly interpolate between the known total (turb+rad+subs+micro) @@ -4104,313 +4163,319 @@ subroutine kmkhz_9c ( & end if c_tke = 1.33_r_bl/(vkman*c_ws**two_thirds) -!$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - ! Entrainment flux applied to level NTML+1 which is the - ! flux-level above the top of the SML - k=ntml(i,j)+1 - - if ( t_frac(i,j) > zero ) then - - rhokh_top(i,j,k) = zero ! apply entrainment explicitly - rhokh(i,j,k) = zero ! " - - tothf_zh(i,j) = - we_rho(i,j)*dsl_sml(i,j) + ft_nt_zh(i,j) - ! Linearly interpolate to entrainment flux grid-level - tothf_efl = ft_nt(i,j,1) + ftl(i,j,1) + & - ( tothf_zh(i,j)-ft_nt(i,j,1)-ftl(i,j,1) )*zrzi(i,j) - ! Ensure total heat flux gradient in inversion grid-level is - ! consistent with inversion rising (ie. implies cooling in - ! level K relative to the mixed layer) or falling - ! (implies warming) - - ml_tend = -( tothf_zh(i,j)-ft_nt(i,j,1)-ftl(i,j,1) ) / zh(i,j) - fa_tend = zero - if ( k+1 <= bl_levels ) & - fa_tend = - ( ft_nt(i,j,k+2) - ft_nt(i,j,k+1) ) & - / dzl(i,j,k+1) - inv_tend = zh_frac(i,j) * ml_tend & - + (one-zh_frac(i,j)) * fa_tend - if (we_parm(i,j)+w_ls(i,j) >= zero) then - ! Inversion moving up so inversion level should cool - ! Ensure it does cool relative to ML - tothf_efl = min( tothf_efl, & - ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) - ! Ensure inversion level won't end up colder than - ! NTML by end of timestep. - ! Set INV_TEND to max allowable cooling rate, also - ! allowing for change in ML_TEND arising from this change - ! to TOTHF_EFL: - inv_tend = (sl(i,j,k-1)-sl(i,j,k))/timestep & - + (ft_nt(i,j,1)+ftl(i,j,1))/z_uv(i,j,k) - tothf_efl = max( tothf_efl, & - (ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) - else ! WE_PARM+W_LS < 0 - ! Ensure inversion level does warm relative to ML - tothf_efl = max( tothf_efl, & - ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) +! do j = pdims%j_start, pdims%j_end +!$OMP do SCHEDULE(STATIC) +do i = pdims%i_start, pdims%i_end + + ! Entrainment flux applied to level NTML+1 which is the + ! flux-level above the top of the SML + k=ntml(i,j)+1 + + if ( t_frac(i,j) > zero ) then + + rhokh_top(i,j,k) = zero ! apply entrainment explicitly + rhokh(i,j,k) = zero ! " + + tothf_zh(i,j) = - we_rho(i,j)*dsl_sml(i,j) + ft_nt_zh(i,j) + ! Linearly interpolate to entrainment flux grid-level + tothf_efl = ft_nt(i,j,1) + ftl(i,j,1) + & + ( tothf_zh(i,j)-ft_nt(i,j,1)-ftl(i,j,1) )*zrzi(i,j) + ! Ensure total heat flux gradient in inversion grid-level is + ! consistent with inversion rising (ie. implies cooling in + ! level K relative to the mixed layer) or falling + ! (implies warming) + + ml_tend = -( tothf_zh(i,j)-ft_nt(i,j,1)-ftl(i,j,1) ) / zh(i,j) + fa_tend = zero + if ( k+1 <= bl_levels ) & + fa_tend = - ( ft_nt(i,j,k+2) - ft_nt(i,j,k+1) ) & + / dzl(i,j,k+1) + inv_tend = zh_frac(i,j) * ml_tend & + + (one-zh_frac(i,j)) * fa_tend + if (we_parm(i,j)+w_ls(i,j) >= zero) then + ! Inversion moving up so inversion level should cool + ! Ensure it does cool relative to ML + tothf_efl = min( tothf_efl, & + ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) + ! Ensure inversion level won't end up colder than + ! NTML by end of timestep. + ! Set INV_TEND to max allowable cooling rate, also + ! allowing for change in ML_TEND arising from this change + ! to TOTHF_EFL: + inv_tend = (sl(i,j,k-1)-sl(i,j,k))/timestep & + + (ft_nt(i,j,1)+ftl(i,j,1))/z_uv(i,j,k) + tothf_efl = max( tothf_efl, & + (ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) + else ! WE_PARM+W_LS < 0 + ! Ensure inversion level does warm relative to ML + tothf_efl = max( tothf_efl, & + ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) + end if + ! Turbulent entrainment flux is then the residual of the total + ! flux and the net flux from other processes + ftl(i,j,k) = t_frac(i,j) * ( tothf_efl - ft_nt(i,j,k) ) + else ! not specifying entrainment flux but KH + ! Include entrainment KH in K-profiles, if greater + ! (for COUPLED layers these will be zero) + rhokh_top(i,j,k) = max( rhokh_top(i,j,k), rhokh_top_ent(i,j) ) + rhokh(i,j,k) = max( rhokh(i,j,k), rhokh_surf_ent(i,j) ) + + if (res_inv(i,j) == 1) then + Prandtl = min( rhokm(i,j,k)/(rbl_eps+rhokh_surf_ent(i,j)), & + pr_max ) + if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then + ! need velocity scale for TKE diagnostic + w_m = ( v_s(i,j)*v_s(i,j)*v_s(i,j) + & + c_ws * zh(i,j) * fb_surf(i,j) ) ** one_third end if - ! Turbulent entrainment flux is then the residual of the total - ! flux and the net flux from other processes - ftl(i,j,k) = t_frac(i,j) * ( tothf_efl - ft_nt(i,j,k) ) - else ! not specifying entrainment flux but KH - ! Include entrainment KH in K-profiles, if greater - ! (for COUPLED layers these will be zero) - rhokh_top(i,j,k) = max( rhokh_top(i,j,k), rhokh_top_ent(i,j) ) - rhokh(i,j,k) = max( rhokh(i,j,k), rhokh_surf_ent(i,j) ) - - if (res_inv(i,j) == 1) then - Prandtl = min( rhokm(i,j,k)/(rbl_eps+rhokh_surf_ent(i,j)), & - pr_max ) - if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then - ! need velocity scale for TKE diagnostic - w_m = ( v_s(i,j)*v_s(i,j)*v_s(i,j) + & - c_ws * zh(i,j) * fb_surf(i,j) ) ** one_third - end if - if (bl_res_inv == cosine_inv_flux) then - svl_lapse_rho = (svl(i,j,k)-svl(i,j,k-1)) / & - ( (z_tq(i,j,k)-z_tq(i,j,k-1))*rho_mix(i,j,k) ) - kl=k+1 - do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & - kl <= bl_levels ) - recip_svl_lapse = (z_tq(i,j,kl)-z_tq(i,j,kl-1))/ & - max( 0.01_r_bl, svl(i,j,kl)-svl(i,j,kl-1) ) - rhok_inv = rhokh_surf_ent(i,j) * svl_lapse_rho * & - rho_mix(i,j,kl) * recip_svl_lapse * & - cos(one_half*pi*(z_uv(i,j,kl)-zh(i,j))/dzh(i,j)) - rhok_inv = min( rhok_inv, 1000.0_r_bl ) - rhokh(i,j,kl) = max( rhokh(i,j,kl), rhok_inv ) - ! rescale for KM on staggered grid - rhok_inv = Prandtl * rhok_inv & - * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & - * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) - rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) - if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then - ! save Km/timescale for TKE diag, completed in bdy_expl2 - tke_nl(i,j,kl) = max( tke_nl(i,j,kl), rhok_inv*c_tke*w_m/zh(i,j)) - end if - kl=kl+1 - end do - else if (bl_res_inv == target_inv_profile) then - svl_lapse = (svl(i,j,k)-svl(i,j,k-1)) / & - ( (z_tq(i,j,k)-z_tq(i,j,k-1)) ) - kp=k+1 ! kp marks the lowest level above the inversion - do while ( z_uv(i,j,kp) < zh(i,j)+dzh(i,j) .and. & - kp <= bl_levels ) - kp=kp+1 - end do - svl_flux(k) = - rhokh_surf_ent(i,j) * svl_lapse - kl=k+1 - do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & - kl <= bl_levels ) - ! assume a linear target svl profile within inversion - svl_target = svl(i,j,k-1) + (svl(i,j,kp)-svl(i,j,k-1)) * & - (z_uv(i,j,kl)-zh(i,j)) / dzh(i,j) - rho_dz = rho_mix_tq(i,j,kl) * dzl(i,j,kl) - svl_flux(kl) = svl_flux(kl-1) - & - (svl_target-svl(i,j,kl))*rho_dz/timestep - kl=kl+1 - end do - ! linearly extrapolate flux to inversion top - svl_flux(kp)=svl_flux(kp-1) + (svl_flux(kp-1)-svl_flux(kp-2))* & - (zh(i,j)+dzh(i,j)-z_uv(i,j,kp-1))*rdz(i,j,kp-1) - kl=k+1 - do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & - kl <= bl_levels ) - ! rescale svl_flux so as to have zero flux at the inversion top - ! ie so svl_flux(kp)=0 - svl_flux(kl) = svl_flux(k)*( one - & - (svl_flux(kl)-svl_flux(k))/ & - (svl_flux(kp)-svl_flux(k)) ) - recip_svl_lapse = (z_tq(i,j,kl)-z_tq(i,j,kl-1))/ & - max( 0.01_r_bl, svl(i,j,kl)-svl(i,j,kl-1) ) - rhok_inv = - svl_flux(kl) * recip_svl_lapse - - rhok_inv = min( rhok_inv, 1000.0_r_bl ) - rhokh(i,j,kl) = max( rhokh(i,j,kl), rhok_inv ) - ! rescale for KM on staggered grid - rhok_inv = Prandtl * rhok_inv & - * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & - * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) - rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) - if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then - ! save Km/timescale for TKE diag, completed in bdy_expl2 - tke_nl(i,j,kl) = max( tke_nl(i,j,kl), rhok_inv*c_tke*w_m/zh(i,j)) - end if - kl=kl+1 - end do - end if ! bl_res_inv option - end if ! res_inv - end if ! test on T_FRAC gt 0 + if (bl_res_inv == cosine_inv_flux) then + svl_lapse_rho = (svl(i,j,k)-svl(i,j,k-1)) / & + ( (z_tq(i,j,k)-z_tq(i,j,k-1))*rho_mix(i,j,k) ) + kl=k+1 + do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & + kl <= bl_levels ) + recip_svl_lapse = (z_tq(i,j,kl)-z_tq(i,j,kl-1))/ & + max( 0.01_r_bl, svl(i,j,kl)-svl(i,j,kl-1) ) + rhok_inv = rhokh_surf_ent(i,j) * svl_lapse_rho * & + rho_mix(i,j,kl) * recip_svl_lapse * & + cos(one_half*pi*(z_uv(i,j,kl)-zh(i,j))/dzh(i,j)) + rhok_inv = min( rhok_inv, 1000.0_r_bl ) + rhokh(i,j,kl) = max( rhokh(i,j,kl), rhok_inv ) + ! rescale for KM on staggered grid + rhok_inv = Prandtl * rhok_inv & + * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & + * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) + rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) + if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then + ! save Km/timescale for TKE diag, completed in bdy_expl2 + tke_nl(i,j,kl) = max( tke_nl(i,j,kl), rhok_inv*c_tke*w_m/zh(i,j)) + end if + kl=kl+1 + end do + else if (bl_res_inv == target_inv_profile) then + svl_lapse = (svl(i,j,k)-svl(i,j,k-1)) / & + ( (z_tq(i,j,k)-z_tq(i,j,k-1)) ) + kp=k+1 ! kp marks the lowest level above the inversion + do while ( z_uv(i,j,kp) < zh(i,j)+dzh(i,j) .and. & + kp <= bl_levels ) + kp=kp+1 + end do + svl_flux(k) = - rhokh_surf_ent(i,j) * svl_lapse + kl=k+1 + do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & + kl <= bl_levels ) + ! assume a linear target svl profile within inversion + svl_target = svl(i,j,k-1) + (svl(i,j,kp)-svl(i,j,k-1)) * & + (z_uv(i,j,kl)-zh(i,j)) / dzh(i,j) + rho_dz = rho_mix_tq(i,j,kl) * dzl(i,j,kl) + svl_flux(kl) = svl_flux(kl-1) - & + (svl_target-svl(i,j,kl))*rho_dz/timestep + kl=kl+1 + end do + ! linearly extrapolate flux to inversion top + svl_flux(kp)=svl_flux(kp-1) + (svl_flux(kp-1)-svl_flux(kp-2))* & + (zh(i,j)+dzh(i,j)-z_uv(i,j,kp-1))*rdz(i,j,kp-1) + kl=k+1 + do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & + kl <= bl_levels ) + ! rescale svl_flux so as to have zero flux at the inversion top + ! ie so svl_flux(kp)=0 + svl_flux(kl) = svl_flux(k)*( one - & + (svl_flux(kl)-svl_flux(k))/ & + (svl_flux(kp)-svl_flux(k)) ) + recip_svl_lapse = (z_tq(i,j,kl)-z_tq(i,j,kl-1))/ & + max( 0.01_r_bl, svl(i,j,kl)-svl(i,j,kl-1) ) + rhok_inv = - svl_flux(kl) * recip_svl_lapse + + rhok_inv = min( rhok_inv, 1000.0_r_bl ) + rhokh(i,j,kl) = max( rhokh(i,j,kl), rhok_inv ) + ! rescale for KM on staggered grid + rhok_inv = Prandtl * rhok_inv & + * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & + * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) + rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) + if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then + ! save Km/timescale for TKE diag, completed in bdy_expl2 + tke_nl(i,j,kl) = max( tke_nl(i,j,kl), rhok_inv*c_tke*w_m/zh(i,j)) + end if + kl=kl+1 + end do + end if ! bl_res_inv option + end if ! res_inv + end if ! test on T_FRAC gt 0 - end do end do !$OMP end do NOWAIT +!end do + !------------------------------------------------- !..Second the decoupled mixed layer, if entraining !------------------------------------------------- + +!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end +do i = pdims%i_start, pdims%i_end - zhsc_np1(i,j) = zero - t_frac_dsc(i,j) = zero - zrzi_dsc(i,j) = zero - we_rho_dsc(i,j) = zero - tothf_zhsc(i,j) = zero - totqf_zhsc(i,j) = zero + zhsc_np1(i,j) = zero + t_frac_dsc(i,j) = zero + zrzi_dsc(i,j) = zero + we_rho_dsc(i,j) = zero + tothf_zhsc(i,j) = zero + totqf_zhsc(i,j) = zero - k=ntdsc(i,j)+1 - we_dsc_parm(i,j) = rdz(i,j,k)*rhokh_dsct_ent(i,j) & - / rho_mix(i,j,k) + k=ntdsc(i,j)+1 + we_dsc_parm(i,j) = rdz(i,j,k)*rhokh_dsct_ent(i,j) & + / rho_mix(i,j,k) - if ( dsc_disc_inv(i,j) == 1 & - .and. rhokh_dsct_ent(i,j) > zero ) then + if ( dsc_disc_inv(i,j) == 1 & + .and. rhokh_dsct_ent(i,j) > zero ) then - !----------------------------------------------------------------- - !..Calculate ZHSC at end of timestep, ZHSC_NP1 - !----------------------------------------------------------------- - !..interpolate vertical velocity to ZH - if ( zhsc(i,j) >= z_tq(i,j,k) ) then - w_ls_dsc(i,j) = w(i,j,k) + ( w(i,j,k+1) - w(i,j,k) ) * & - (zhsc(i,j)-z_tq(i,j,k)) * rdz(i,j,k+1) - else - w_ls_dsc(i,j) = w(i,j,k) + ( w(i,j,k) - w(i,j,k-1) ) * & - (zhsc(i,j)-z_tq(i,j,k)) * rdz(i,j,k) - end if - w_ls_dsc(i,j) = min ( w_ls_dsc(i,j), zero ) - ! only interested in subsidence - - zhsc_np1(i,j) = zhsc(i,j) + & - timestep * ( we_dsc_parm(i,j) + w_ls_dsc(i,j) ) - zhsc_np1(i,j) = max( zhsc_np1(i,j), z_uv(i,j,k-1) ) - if ( zhsc_np1(i,j) > z_top(i,j,k+1) ) then - ! limit ZHSC and W_e (and therefore the entrainment fluxes) - ! because the inversion cannot rise more than one level - ! in a timestep. - zhsc_np1(i,j) = z_top(i,j,k+1) - we_dsc_parm(i,j) = & - (z_top(i,j,k+1) - zhsc(i,j))/timestep - w_ls_dsc(i,j) - end if - !----------------------------------------------------------------- - !..Decide on which grid-level to apply entrainment flux - !----------------------------------------------------------------- - if ( zhsc_np1(i,j) > z_uv(i,j,ntdsc(i,j)+2) ) then - ! ZHSC risen above level K+1 so specify appropriate - ! flux at this level and raise NTDSC by one + !----------------------------------------------------------------- + !..Calculate ZHSC at end of timestep, ZHSC_NP1 + !----------------------------------------------------------------- + !..interpolate vertical velocity to ZH + if ( zhsc(i,j) >= z_tq(i,j,k) ) then + w_ls_dsc(i,j) = w(i,j,k) + ( w(i,j,k+1) - w(i,j,k) ) * & + (zhsc(i,j)-z_tq(i,j,k)) * rdz(i,j,k+1) + else + w_ls_dsc(i,j) = w(i,j,k) + ( w(i,j,k) - w(i,j,k-1) ) * & + (zhsc(i,j)-z_tq(i,j,k)) * rdz(i,j,k) + end if + w_ls_dsc(i,j) = min ( w_ls_dsc(i,j), zero ) + ! only interested in subsidence + + zhsc_np1(i,j) = zhsc(i,j) + & + timestep * ( we_dsc_parm(i,j) + w_ls_dsc(i,j) ) + zhsc_np1(i,j) = max( zhsc_np1(i,j), z_uv(i,j,k-1) ) + if ( zhsc_np1(i,j) > z_top(i,j,k+1) ) then + ! limit ZHSC and W_e (and therefore the entrainment fluxes) + ! because the inversion cannot rise more than one level + ! in a timestep. + zhsc_np1(i,j) = z_top(i,j,k+1) + we_dsc_parm(i,j) = & + (z_top(i,j,k+1) - zhsc(i,j))/timestep - w_ls_dsc(i,j) + end if + !----------------------------------------------------------------- + !..Decide on which grid-level to apply entrainment flux + !----------------------------------------------------------------- + if ( zhsc_np1(i,j) > z_uv(i,j,ntdsc(i,j)+2) ) then + ! ZHSC risen above level K+1 so specify appropriate + ! flux at this level and raise NTDSC by one - ntdsc(i,j) = ntdsc(i,j) + 1 - k = ntdsc(i,j)+1 - dsc_disc_inv(i,j) = 2 - t_frac_dsc(i,j) = (zhsc_np1(i,j)-z_uv(i,j,k)) / & - (zhsc_np1(i,j)-zhsc(i,j)) + ntdsc(i,j) = ntdsc(i,j) + 1 + k = ntdsc(i,j)+1 + dsc_disc_inv(i,j) = 2 + t_frac_dsc(i,j) = (zhsc_np1(i,j)-z_uv(i,j,k)) / & + (zhsc_np1(i,j)-zhsc(i,j)) - zhsc_frac(i,j) = one_half*t_frac_dsc(i,j)* & - ( zhsc_np1(i,j)-z_uv(i,j,k) )/ dzl(i,j,k) + zhsc_frac(i,j) = one_half*t_frac_dsc(i,j)* & + ( zhsc_np1(i,j)-z_uv(i,j,k) )/ dzl(i,j,k) - else if ( zhsc_np1(i,j) > z_uv(i,j,ntdsc(i,j)+1) ) then - ! ZHSC always between half-levels NTDSC+1 and NTDSC+2 + else if ( zhsc_np1(i,j) > z_uv(i,j,ntdsc(i,j)+1) ) then + ! ZHSC always between half-levels NTDSC+1 and NTDSC+2 - t_frac_dsc(i,j) = one - zhsc_frac(i,j) = ( one_half*(zhsc(i,j)+zhsc_np1(i,j)) & - - z_uv(i,j,k) )/ dzl(i,j,k) + t_frac_dsc(i,j) = one + zhsc_frac(i,j) = ( one_half*(zhsc(i,j)+zhsc_np1(i,j)) & + - z_uv(i,j,k) )/ dzl(i,j,k) - else - ! ZHSC falls below half-level NTDSC+1 - ! Keep implicit (diffusive) entrainment but apply - ! at the level below - ntdsc(i,j) = ntdsc(i,j) - 1 ! could reduce NTDSC to 1 - k = ntdsc(i,j)+1 - rhokh_top(i,j,k+1) = zero - rhokh(i,j,k+1) = zero - - t_frac_dsc(i,j) = zero - zhsc_frac(i,j) = zero - dsc_disc_inv(i,j) = 0 + else + ! ZHSC falls below half-level NTDSC+1 + ! Keep implicit (diffusive) entrainment but apply + ! at the level below + ntdsc(i,j) = ntdsc(i,j) - 1 ! could reduce NTDSC to 1 + k = ntdsc(i,j)+1 + rhokh_top(i,j,k+1) = zero + rhokh(i,j,k+1) = zero - end if ! test on where to apply entrainment flux + t_frac_dsc(i,j) = zero + zhsc_frac(i,j) = zero + dsc_disc_inv(i,j) = 0 - we_rho_dsc(i,j) = rho_mix(i,j,k) * we_dsc_parm(i,j) - ! for z'/z_i' assume height of DSC base is fixed in time - zrzi_dsc(i,j) =( z_uv(i,j,k)-(zhsc(i,j)-dscdepth(i,j)) ) & - /( dscdepth(i,j)+one_half*(zhsc_np1(i,j)-zhsc(i,j)) ) + end if ! test on where to apply entrainment flux - end if ! test on DSC_DISC_INV, etc - end do + we_rho_dsc(i,j) = rho_mix(i,j,k) * we_dsc_parm(i,j) + ! for z'/z_i' assume height of DSC base is fixed in time + zrzi_dsc(i,j) =( z_uv(i,j,k)-(zhsc(i,j)-dscdepth(i,j)) ) & + /( dscdepth(i,j)+one_half*(zhsc_np1(i,j)-zhsc(i,j)) ) + + end if ! test on DSC_DISC_INV, etc end do !$OMP end do NOWAIT +! end do + !----------------------------------------------------------------------- !..Linearly interpolate between the known total (turb+rad+subs+micro) !..flux at the DSC base and the parametrized flux at the inversion !----------------------------------------------------------------------- -!$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - - ! Entrainment flux applied to level NTDSC+1 which is the - ! flux-level above the top of the DSC layer - k=ntdsc(i,j)+1 - - if ( t_frac_dsc(i,j) > zero ) then - - rhokh_top(i,j,k) = zero ! apply entrainment explicitly - rhokh(i,j,k) = zero ! " - - tothf_zhsc(i,j) = - we_rho_dsc(i,j)*dsl_dsc(i,j) & - + ft_nt_zhsc(i,j) - tothf_efl = ft_nt_dscb(i,j) + & - ( tothf_zhsc(i,j)-ft_nt_dscb(i,j) )*zrzi_dsc(i,j) - ! Ensure total heat flux gradient in inversion grid-level is - ! consistent with inversion rising (implies cooling in - ! level K, relative to mixed layer) or falling - ! (implies warming) - ml_tend = - ( tothf_zhsc(i,j)-ft_nt_dscb(i,j) )/ dscdepth(i,j) - fa_tend = zero - if ( k+1 <= bl_levels ) & - fa_tend = - ( ft_nt(i,j,k+2) - ft_nt(i,j,k+1) ) & - / dzl(i,j,k+1) - inv_tend = zhsc_frac(i,j) * ml_tend & - + (one-zhsc_frac(i,j)) * fa_tend - if (we_dsc_parm(i,j)+w_ls_dsc(i,j) >= zero) then - ! Inversion moving up so inversion level should cool - ! Ensure it does cool relative to ML - tothf_efl = min( tothf_efl, & - ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) - ! Ensure inversion level won't end up colder than - ! NTDSC by end of timestep. - inv_tend = (sl(i,j,k-1)-sl(i,j,k))/timestep & - + ft_nt_dscb(i,j)/dscdepth(i,j) - tothf_efl = max( tothf_efl, & - (ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/dscdepth(i,j)) ) - else ! WE_DSC_PARM+W_LS_DSC < 0 - tothf_efl = max( tothf_efl, & - ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) - end if - ! Turbulent entrainment flux is then the residual of the total - ! flux and the net flux from other processes - ftl(i,j,k) = t_frac_dsc(i,j) * ( tothf_efl - ft_nt(i,j,k) ) +! do j = pdims%j_start, pdims%j_end +!$OMP do SCHEDULE(STATIC) +do i = pdims%i_start, pdims%i_end + + ! Entrainment flux applied to level NTDSC+1 which is the + ! flux-level above the top of the DSC layer + k=ntdsc(i,j)+1 + + if ( t_frac_dsc(i,j) > zero ) then + + rhokh_top(i,j,k) = zero ! apply entrainment explicitly + rhokh(i,j,k) = zero ! " + + tothf_zhsc(i,j) = - we_rho_dsc(i,j)*dsl_dsc(i,j) & + + ft_nt_zhsc(i,j) + tothf_efl = ft_nt_dscb(i,j) + & + ( tothf_zhsc(i,j)-ft_nt_dscb(i,j) )*zrzi_dsc(i,j) + ! Ensure total heat flux gradient in inversion grid-level is + ! consistent with inversion rising (implies cooling in + ! level K, relative to mixed layer) or falling + ! (implies warming) + ml_tend = - ( tothf_zhsc(i,j)-ft_nt_dscb(i,j) )/ dscdepth(i,j) + fa_tend = zero + if ( k+1 <= bl_levels ) & + fa_tend = - ( ft_nt(i,j,k+2) - ft_nt(i,j,k+1) ) & + / dzl(i,j,k+1) + inv_tend = zhsc_frac(i,j) * ml_tend & + + (one-zhsc_frac(i,j)) * fa_tend + + if (we_dsc_parm(i,j)+w_ls_dsc(i,j) >= zero) then + ! Inversion moving up so inversion level should cool + ! Ensure it does cool relative to ML + tothf_efl = min( tothf_efl, & + ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) + ! Ensure inversion level won't end up colder than + ! NTDSC by end of timestep. + inv_tend = (sl(i,j,k-1)-sl(i,j,k))/timestep & + + ft_nt_dscb(i,j)/dscdepth(i,j) + tothf_efl = max( tothf_efl, & + (ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/dscdepth(i,j)) ) + else ! WE_DSC_PARM+W_LS_DSC < 0 + tothf_efl = max( tothf_efl, & + ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) + end if + ! Turbulent entrainment flux is then the residual of the total + ! flux and the net flux from other processes + ftl(i,j,k) = t_frac_dsc(i,j) * ( tothf_efl - ft_nt(i,j,k) ) - else if ( dsc(i,j) ) then + else if ( dsc(i,j) ) then - ! Not specifying entrainment flux but KH - ! Include entrainment KH in K-profile, if greater - rhokh_top(i,j,k) = max( rhokh_top(i,j,k),rhokh_dsct_ent(i,j) ) + ! Not specifying entrainment flux but KH + ! Include entrainment KH in K-profile, if greater + rhokh_top(i,j,k) = max( rhokh_top(i,j,k),rhokh_dsct_ent(i,j) ) - end if ! if not DSC + end if ! if not DSC - end do end do !$OMP end do NOWAIT +!end do + !----------------------------------------------------------------------- ! Specify QW entrainment fluxes @@ -4424,42 +4489,45 @@ subroutine kmkhz_9c ( & ! the inversion grid-level is physically within the BL) ! ------------------------------------------------------------------ + +! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - fq_nt_dscb(i,j) = fq_nt(i,j,1) - if ( nbdsc(i,j) > 1 ) then - k = nbdsc(i,j) ! NBDSC marks the lowest flux-level - ! within the DSC layer - ! Interpolate non-turb flux to base - ! of DSC layer: - fq_nt_dscb(i,j) = fq_nt(i,j,k-1) + & - (fq_nt(i,j,k)-fq_nt(i,j,k-1)) & - *(zdsc_base(i,j)-z_uv(i,j,k-1))/dzl(i,j,k-1) - end if - end do +do i = pdims%i_start, pdims%i_end + fq_nt_dscb(i,j) = fq_nt(i,j,1) + if ( nbdsc(i,j) > 1 ) then + k = nbdsc(i,j) ! NBDSC marks the lowest flux-level + ! within the DSC layer + ! Interpolate non-turb flux to base + ! of DSC layer: + fq_nt_dscb(i,j) = fq_nt(i,j,k-1) + & + (fq_nt(i,j,k)-fq_nt(i,j,k-1)) & + *(zdsc_base(i,j)-z_uv(i,j,k-1))/dzl(i,j,k-1) + end if end do !$OMP end do NOWAIT +! end do + ! Repeat for water tracers if (l_wtrac) then do i_wt = 1, n_wtrac -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - wtrac_bl(i_wt)%fq_nt_dscb(i,j) = wtrac_bl(i_wt)%fq_nt(i,j,1) - if ( nbdsc(i,j) > 1 ) then - k = nbdsc(i,j) ! NBDSC marks the lowest flux-level - ! within the DSC layer - ! Interpolate non-turb flux to base - ! of DSC layer: - wtrac_bl(i_wt)%fq_nt_dscb(i,j) = wtrac_bl(i_wt)%fq_nt(i,j,k-1) + & - ( wtrac_bl(i_wt)%fq_nt(i,j,k)- wtrac_bl(i_wt)%fq_nt(i,j,k-1)) & - *(zdsc_base(i,j)-z_uv(i,j,k-1))/dzl(i,j,k-1) - end if - end do + ! do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + wtrac_bl(i_wt)%fq_nt_dscb(i,j) = wtrac_bl(i_wt)%fq_nt(i,j,1) + if ( nbdsc(i,j) > 1 ) then + k = nbdsc(i,j) ! NBDSC marks the lowest flux-level + ! within the DSC layer + ! Interpolate non-turb flux to base + ! of DSC layer: + wtrac_bl(i_wt)%fq_nt_dscb(i,j) = wtrac_bl(i_wt)%fq_nt(i,j,k-1) + & + ( wtrac_bl(i_wt)%fq_nt(i,j,k)- wtrac_bl(i_wt)%fq_nt(i,j,k-1)) & + *(zdsc_base(i,j)-z_uv(i,j,k-1))/dzl(i,j,k-1) + end if end do -!$OMP end do + !$OMP end do + ! end do + end do end if ! l_wtrac @@ -4468,101 +4536,103 @@ subroutine kmkhz_9c ( & ! microphysical and subsidence fluxes are correctly coupled. !----------------------------------------------------------------------- -!$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - moisten(i,j) = .false. - if (l_wtrac) totqf_efl_meth1(i,j) = 0 - if (l_wtrac) totqf_efl_meth2(i,j) = 0 - k = ntml(i,j)+1 - - if ( t_frac(i,j) > zero ) then - ! Calculate total (turb+micro+subs) QW flux at subgrid - ! inversion height - totqf_zh(i,j) = - we_rho(i,j)*dqw_sml(i,j) + fq_nt_zh(i,j) - ! Interpolate to entrainment flux-level below - totqf_efl = fq_nt(i,j,1) + fqw(i,j,1) + zrzi(i,j) * & - ( totqf_zh(i,j) - fq_nt(i,j,1) - fqw(i,j,1) ) - ! Need to ensure the total QW flux gradient in inversion - ! grid-level is consistent with inversion rising or falling. - ! If QW(K) is drier than mixed layer then inversion rising - ! implies moistening in level K relative to mixed layer - ! while falling would imply relative drying of level K. - ! If QW(K) is moister than ML then want opposite tendencies. - ml_tend = - ( totqf_zh(i,j)-fq_nt(i,j,1)-fqw(i,j,1) ) /zh(i,j) - fa_tend = zero - if ( k+1 <= bl_levels ) & - fa_tend = - ( fq_nt(i,j,k+2)-fq_nt(i,j,k+1) ) & - / dzl(i,j,k+1) - inv_tend = zh_frac(i,j) * ml_tend & - + (one-zh_frac(i,j)) * fa_tend - if (we_parm(i,j)+w_ls(i,j) >= zero) then - ! inversion moving up so inversion will moisten/dry - ! depending on relative QW in level below - moisten(i,j) = ( qw(i,j,k) <= qw(i,j,k-1) ) - else - ! inversion moving down so inversion will moisten/dry - ! depending on relative QW in level above - moisten(i,j) = ( qw(i,j,k) <= qw(i,j,k+1) ) - end if +! do j = pdims%j_start, pdims%j_end +!$OMP do SCHEDULE(STATIC) +do i = pdims%i_start, pdims%i_end + moisten(i,j) = .false. + if (l_wtrac) totqf_efl_meth1(i,j) = 0 + if (l_wtrac) totqf_efl_meth2(i,j) = 0 + k = ntml(i,j)+1 + + if ( t_frac(i,j) > zero ) then + ! Calculate total (turb+micro+subs) QW flux at subgrid + ! inversion height + totqf_zh(i,j) = - we_rho(i,j)*dqw_sml(i,j) + fq_nt_zh(i,j) + ! Interpolate to entrainment flux-level below + totqf_efl = fq_nt(i,j,1) + fqw(i,j,1) + zrzi(i,j) * & + ( totqf_zh(i,j) - fq_nt(i,j,1) - fqw(i,j,1) ) + ! Need to ensure the total QW flux gradient in inversion + ! grid-level is consistent with inversion rising or falling. + ! If QW(K) is drier than mixed layer then inversion rising + ! implies moistening in level K relative to mixed layer + ! while falling would imply relative drying of level K. + ! If QW(K) is moister than ML then want opposite tendencies. + ml_tend = - ( totqf_zh(i,j)-fq_nt(i,j,1)-fqw(i,j,1) ) /zh(i,j) + fa_tend = zero + if ( k+1 <= bl_levels ) & + fa_tend = - ( fq_nt(i,j,k+2)-fq_nt(i,j,k+1) ) & + / dzl(i,j,k+1) + inv_tend = zh_frac(i,j) * ml_tend & + + (one-zh_frac(i,j)) * fa_tend + + if (we_parm(i,j)+w_ls(i,j) >= zero) then + ! inversion moving up so inversion will moisten/dry + ! depending on relative QW in level below + moisten(i,j) = ( qw(i,j,k) <= qw(i,j,k-1) ) + else + ! inversion moving down so inversion will moisten/dry + ! depending on relative QW in level above + moisten(i,j) = ( qw(i,j,k) <= qw(i,j,k+1) ) + end if - if ( moisten(i,j) ) then - ! Ensure inversion level does moisten relative to ML + if ( moisten(i,j) ) then + ! Ensure inversion level does moisten relative to ML - if (l_wtrac .and. totqf_efl < (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & - totqf_efl_meth1(i,j) = 1 ! Store method + if (l_wtrac .and. totqf_efl < (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & + totqf_efl_meth1(i,j) = 1 ! Store method - totqf_efl = max( totqf_efl, & - fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) - if (we_parm(i,j)+w_ls(i,j) >= zero) then - ! Ensure inversion level won't end up more moist than - ! NTML by end of timestep. - ! Set INV_TEND to max allowable moistening rate, also - ! allowing for change in ML_TEND arising from this change - ! to TOTQF_EFL: - inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & - + (fq_nt(i,j,1)+fqw(i,j,1))/z_uv(i,j,k) - - if (l_wtrac .and. totqf_efl > & - ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) ) & - totqf_efl_meth2(i,j) = 1 ! Store method - - totqf_efl = min( totqf_efl, & - (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) - end if - else - if (l_wtrac .and. totqf_efl > (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & - totqf_efl_meth1(i,j) = 1 ! Store method + totqf_efl = max( totqf_efl, & + fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) + if (we_parm(i,j)+w_ls(i,j) >= zero) then + ! Ensure inversion level won't end up more moist than + ! NTML by end of timestep. + ! Set INV_TEND to max allowable moistening rate, also + ! allowing for change in ML_TEND arising from this change + ! to TOTQF_EFL: + inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & + + (fq_nt(i,j,1)+fqw(i,j,1))/z_uv(i,j,k) + + if (l_wtrac .and. totqf_efl > & + ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) ) & + totqf_efl_meth2(i,j) = 1 ! Store method + + totqf_efl = min( totqf_efl, & + (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) + end if + else + if (l_wtrac .and. totqf_efl > (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & + totqf_efl_meth1(i,j) = 1 ! Store method - totqf_efl = min( totqf_efl, & - fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) - if (we_parm(i,j)+w_ls(i,j) >= zero) then - ! Ensure inversion level won't end up drier than - ! NTML by end of timestep. - ! Set INV_TEND to max allowable drying rate: - inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & - + (fq_nt(i,j,1)+fqw(i,j,1))/z_uv(i,j,k) - - if (l_wtrac .and. totqf_efl < & - ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) ) & - totqf_efl_meth2(i,j) = 1 ! Store method - - totqf_efl = max( totqf_efl, & - (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) - end if + totqf_efl = min( totqf_efl, & + fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) + if (we_parm(i,j)+w_ls(i,j) >= zero) then + ! Ensure inversion level won't end up drier than + ! NTML by end of timestep. + ! Set INV_TEND to max allowable drying rate: + inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & + + (fq_nt(i,j,1)+fqw(i,j,1))/z_uv(i,j,k) + + if (l_wtrac .and. totqf_efl < & + ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) ) & + totqf_efl_meth2(i,j) = 1 ! Store method + + totqf_efl = max( totqf_efl, & + (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) end if - fqw(i,j,k) = t_frac(i,j) * & - ( totqf_efl - fq_nt(i,j,k) ) end if + fqw(i,j,k) = t_frac(i,j) * & + ( totqf_efl - fq_nt(i,j,k) ) + end if - end do end do !$OMP end do +!end do + !$OMP end PARALLEL ! Repeat the last block of code for water tracers @@ -4571,14 +4641,16 @@ subroutine kmkhz_9c ( & ! call to calc_fqw_inv_wtrac allocate(z_uv_ntmlp1(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end)) -!$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(SHARED) private(i,j,k) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - k = ntml(i,j) + 1 - z_uv_ntmlp1(i,j) = z_uv(i,j,ntml(i,j)+1) - end do + + !do j = pdims%j_start, pdims%j_end + !$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(SHARED) private(i,k) + do i = pdims%i_start, pdims%i_end + k = ntml(i,j) + 1 + z_uv_ntmlp1(i,j) = z_uv(i,j,ntml(i,j)+1) end do -!$OMP end PARALLEL do + !$OMP end PARALLEL do + !end do + call calc_fqw_inv_wtrac(bl_levels, ntml, totqf_efl_meth1, & totqf_efl_meth2, t_frac, zh, zh_frac, & @@ -4593,95 +4665,93 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- ! Now decoupled layer !----------------------------------------------------------------------- - +!do j = pdims%j_start, pdims%j_end !$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(SHARED) & -!$OMP private ( i, j, k, totqf_efl, ml_tend, fa_tend, inv_tend) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - - moisten(i,j) = .false. - if (l_wtrac) totqf_efl_meth1(i,j) = 0 - if (l_wtrac) totqf_efl_meth2(i,j) = 0 - if ( t_frac_dsc(i,j) > zero ) then - - k = ntdsc(i,j)+1 +!$OMP private ( i, k, totqf_efl, ml_tend, fa_tend, inv_tend) +do i = pdims%i_start, pdims%i_end + moisten(i,j) = .false. + if (l_wtrac) totqf_efl_meth1(i,j) = 0 + if (l_wtrac) totqf_efl_meth2(i,j) = 0 + if ( t_frac_dsc(i,j) > zero ) then + + k = ntdsc(i,j)+1 + + ! Calculate total (turb+micro) QW flux at subgrid inversion + totqf_zhsc(i,j) = - we_rho_dsc(i,j)*dqw_dsc(i,j) & + + fq_nt_zhsc(i,j) + ! Interpolate to entrainment flux-level + totqf_efl = fq_nt_dscb(i,j) + & + ( totqf_zhsc(i,j) - fq_nt_dscb(i,j) )*zrzi_dsc(i,j) + + ml_tend = - ( totqf_zhsc(i,j)-fq_nt_dscb(i,j) )/dscdepth(i,j) + fa_tend = zero + if ( k+1 <= bl_levels ) & + fa_tend = - ( fq_nt(i,j,k+2)-fq_nt(i,j,k+1) ) & + / dzl(i,j,k+1) + inv_tend = zhsc_frac(i,j) * ml_tend & + + (one-zhsc_frac(i,j)) * fa_tend - ! Calculate total (turb+micro) QW flux at subgrid inversion - totqf_zhsc(i,j) = - we_rho_dsc(i,j)*dqw_dsc(i,j) & - + fq_nt_zhsc(i,j) - ! Interpolate to entrainment flux-level - totqf_efl = fq_nt_dscb(i,j) + & - ( totqf_zhsc(i,j) - fq_nt_dscb(i,j) )*zrzi_dsc(i,j) - - ml_tend = - ( totqf_zhsc(i,j)-fq_nt_dscb(i,j) )/dscdepth(i,j) - fa_tend = zero - if ( k+1 <= bl_levels ) & - fa_tend = - ( fq_nt(i,j,k+2)-fq_nt(i,j,k+1) ) & - / dzl(i,j,k+1) - inv_tend = zhsc_frac(i,j) * ml_tend & - + (one-zhsc_frac(i,j)) * fa_tend - - if (we_dsc_parm(i,j)+w_ls_dsc(i,j) >= zero) then - ! inversion moving up so inversion will moisten/dry - ! depending on relative QW in level below - moisten(i,j) = ( qw(i,j,k) <= qw(i,j,k-1) ) - else - ! inversion moving down so inversion will moisten/dry - ! depending on relative QW in level above - moisten(i,j) = ( qw(i,j,k) <= qw(i,j,k+1) ) - end if + if (we_dsc_parm(i,j)+w_ls_dsc(i,j) >= zero) then + ! inversion moving up so inversion will moisten/dry + ! depending on relative QW in level below + moisten(i,j) = ( qw(i,j,k) <= qw(i,j,k-1) ) + else + ! inversion moving down so inversion will moisten/dry + ! depending on relative QW in level above + moisten(i,j) = ( qw(i,j,k) <= qw(i,j,k+1) ) + end if - if ( moisten(i,j) ) then + if ( moisten(i,j) ) then - if (l_wtrac .and. (totqf_efl < fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & - totqf_efl_meth1(i,j) = 1 ! Store method + if (l_wtrac .and. (totqf_efl < fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & + totqf_efl_meth1(i,j) = 1 ! Store method - totqf_efl = max( totqf_efl, & - fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) - if (we_dsc_parm(i,j)+w_ls_dsc(i,j) >= zero) then - ! Ensure inversion level won't end up more moist than - ! NTDSC by end of timestep. - inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & - + fq_nt_dscb(i,j)/dscdepth(i,j) + totqf_efl = max( totqf_efl, & + fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) + if (we_dsc_parm(i,j)+w_ls_dsc(i,j) >= zero) then + ! Ensure inversion level won't end up more moist than + ! NTDSC by end of timestep. + inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & + + fq_nt_dscb(i,j)/dscdepth(i,j) - if (l_wtrac .and. totqf_efl > & - ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/dscdepth(i,j)) ) ) & - totqf_efl_meth2(i,j) = 1 ! Store method + if (l_wtrac .and. totqf_efl > & + ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/dscdepth(i,j)) ) ) & + totqf_efl_meth2(i,j) = 1 ! Store method - totqf_efl = min( totqf_efl, & - (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/dscdepth(i,j)) ) - end if - else - if (l_wtrac .and. totqf_efl > (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & - totqf_efl_meth1(i,j) = 1 ! Store method - - totqf_efl = min( totqf_efl, & - fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) - if (we_dsc_parm(i,j)+w_ls_dsc(i,j) >= zero) then - ! Ensure inversion level won't end up drier than - ! NTDSC by end of timestep. - ! Set INV_TEND to max allowable drying rate: - inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & - + fq_nt_dscb(i,j)/dscdepth(i,j) - - if (l_wtrac .and. totqf_efl < & - ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/dscdepth(i,j))) ) & - totqf_efl_meth2(i,j) = 1 ! Store method - - totqf_efl = max( totqf_efl, & - (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/dscdepth(i,j)) ) - end if + totqf_efl = min( totqf_efl, & + (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/dscdepth(i,j)) ) end if - fqw(i,j,k) = t_frac_dsc(i,j) * ( totqf_efl - fq_nt(i,j,k) ) + else + if (l_wtrac .and. totqf_efl > (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & + totqf_efl_meth1(i,j) = 1 ! Store method + totqf_efl = min( totqf_efl, & + fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) + if (we_dsc_parm(i,j)+w_ls_dsc(i,j) >= zero) then + ! Ensure inversion level won't end up drier than + ! NTDSC by end of timestep. + ! Set INV_TEND to max allowable drying rate: + inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & + + fq_nt_dscb(i,j)/dscdepth(i,j) + + if (l_wtrac .and. totqf_efl < & + ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/dscdepth(i,j))) ) & + totqf_efl_meth2(i,j) = 1 ! Store method + + totqf_efl = max( totqf_efl, & + (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/dscdepth(i,j)) ) + end if end if - end do + fqw(i,j,k) = t_frac_dsc(i,j) * ( totqf_efl - fq_nt(i,j,k) ) + + end if end do !$OMP end PARALLEL do +!end do ! Repeat last block of code for water tracers if (l_wtrac) then @@ -4695,81 +4765,82 @@ subroutine kmkhz_9c ( & end if ! l_wtrac !$OMP PARALLEL DEFAULT(SHARED) & -!$OMP private (i, j, k, kp, w_var_inv, weight, tke_nl_rh, delta_tke, & +!$OMP private (i, k, kp, w_var_inv, weight, tke_nl_rh, delta_tke, & !$OMP w_s_ent, w_s_cubed, w_m, wstar3, w_h) - !----------------------------------------------------------------------- ! Estimate turbulent w-variance scale at discontinuous inversions !----------------------------------------------------------------------- if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - ! We expect the turbulent temperature perturbation scale close - ! to the inversion, Tl' ~ ftl / w_scale, to be at most 1/2 dsl_inv, - ! where ftl is the entrainment heat flux, and w_scale = sqrt(w_var) - ! => w_scale >= 2 ftl / dsl_inv - ! and then square that to get w_var. - - ! Want to set non-local TKE to max of existing value and this - ! w_scale^2, but this is complicated by the fact that - ! tke_nl is on theta-levels, while w_scale is on rho-levels. - ! Compare w_scale^2 with the existing non-local TKE - ! interpolated to the same rho-level; increase TKE on the neighbouring - ! theta-levels if needed to increase interpolated rho-level value - ! to the desired inversion value. - - ! Note: heights z_tq are on actual theta-levels (surface at k=0), - ! but tke_nl is offset (surface at k=1) - - ! Do the above for discontinuous inversion at top of surface mixed-layer - if ( sml_disc_inv(i,j) >= 1 ) then - k = ntml(i,j) + 1 - kp = min( k+1, bl_levels ) - - w_var_inv = 2.0_r_bl * (ftl(i,j,k)/rho_mix(i,j,k)) / dsl_sml(i,j) - w_var_inv = w_var_inv * w_var_inv * rho_mix(i,j,k) - - weight = ( z_uv(i,j,k) - z_tq(i,j,k-1) ) & - / ( z_tq(i,j,k) - z_tq(i,j,k-1) ) - tke_nl_rh = (one-weight) * tke_nl(i,j,k) & - + weight * tke_nl(i,j,kp) - - delta_tke = w_var_inv - tke_nl_rh - if ( delta_tke > zero ) then - tke_nl(i,j,k) = tke_nl(i,j,k) + delta_tke - tke_nl(i,j,kp) = tke_nl(i,j,kp) + delta_tke - end if + ! do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + ! We expect the turbulent temperature perturbation scale close + ! to the inversion, Tl' ~ ftl / w_scale, to be at most 1/2 dsl_inv, + ! where ftl is the entrainment heat flux, and w_scale = sqrt(w_var) + ! => w_scale >= 2 ftl / dsl_inv + ! and then square that to get w_var. + + ! Want to set non-local TKE to max of existing value and this + ! w_scale^2, but this is complicated by the fact that + ! tke_nl is on theta-levels, while w_scale is on rho-levels. + ! Compare w_scale^2 with the existing non-local TKE + ! interpolated to the same rho-level; increase TKE on the neighbouring + ! theta-levels if needed to increase interpolated rho-level value + ! to the desired inversion value. + + ! Note: heights z_tq are on actual theta-levels (surface at k=0), + ! but tke_nl is offset (surface at k=1) + + ! Do the above for discontinuous inversion at top of surface mixed-layer + if ( sml_disc_inv(i,j) >= 1 ) then + k = ntml(i,j) + 1 + kp = min( k+1, bl_levels ) + + w_var_inv = 2.0_r_bl * (ftl(i,j,k)/rho_mix(i,j,k)) / dsl_sml(i,j) + w_var_inv = w_var_inv * w_var_inv * rho_mix(i,j,k) + + weight = ( z_uv(i,j,k) - z_tq(i,j,k-1) ) & + / ( z_tq(i,j,k) - z_tq(i,j,k-1) ) + tke_nl_rh = (one-weight) * tke_nl(i,j,k) & + + weight * tke_nl(i,j,kp) + + delta_tke = w_var_inv - tke_nl_rh + if ( delta_tke > zero ) then + tke_nl(i,j,k) = tke_nl(i,j,k) + delta_tke + tke_nl(i,j,kp) = tke_nl(i,j,kp) + delta_tke end if - ! Repeat for discontinuous inversion at top of decoupled Sc layer - if ( dsc_disc_inv(i,j) >= 1 ) then - k = ntdsc(i,j) + 1 - kp = min( k+1, bl_levels ) + end if - w_var_inv = 2.0_r_bl * (ftl(i,j,k)/rho_mix(i,j,k)) / dsl_dsc(i,j) - w_var_inv = w_var_inv * w_var_inv * rho_mix(i,j,k) + ! Repeat for discontinuous inversion at top of decoupled Sc layer + if ( dsc_disc_inv(i,j) >= 1 ) then + k = ntdsc(i,j) + 1 + kp = min( k+1, bl_levels ) - weight = ( z_uv(i,j,k) - z_tq(i,j,k-1) ) & - / ( z_tq(i,j,k) - z_tq(i,j,k-1) ) - tke_nl_rh = (one-weight) * tke_nl(i,j,k) & - + weight * tke_nl(i,j,kp) + w_var_inv = 2.0_r_bl * (ftl(i,j,k)/rho_mix(i,j,k)) / dsl_dsc(i,j) + w_var_inv = w_var_inv * w_var_inv * rho_mix(i,j,k) - delta_tke = w_var_inv - tke_nl_rh + weight = ( z_uv(i,j,k) - z_tq(i,j,k-1) ) & + / ( z_tq(i,j,k) - z_tq(i,j,k-1) ) + tke_nl_rh = (one-weight) * tke_nl(i,j,k) & + + weight * tke_nl(i,j,kp) - if ( delta_tke > zero ) then - tke_nl(i,j,k) = tke_nl(i,j,k) + delta_tke - tke_nl(i,j,kp) = tke_nl(i,j,kp) + delta_tke - end if + delta_tke = w_var_inv - tke_nl_rh + if ( delta_tke > zero ) then + tke_nl(i,j,k) = tke_nl(i,j,k) + delta_tke + tke_nl(i,j,kp) = tke_nl(i,j,kp) + delta_tke end if - end do + end if + end do -!$OMP end do NOWAIT + !$OMP end do NOWAIT + ! end do + end if ! (BL_diag%l_tke) !----------------------------------------------------------------------- @@ -4781,119 +4852,125 @@ subroutine kmkhz_9c ( & ! grid-level so only one element of these 3D arrays is used. !----------------------------------------------------------------------- + +! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - we_lim(i,j,1) = zero - t_frac_tr(i,j,1) = zero - zrzi_tr(i,j,1) = zero - we_lim_dsc(i,j,1) = zero - t_frac_dsc_tr(i,j,1) = zero - zrzi_dsc_tr(i,j,1) = zero - we_lim(i,j,3) = zero - t_frac_tr(i,j,3) = zero - zrzi_tr(i,j,3) = zero - we_lim_dsc(i,j,3) = zero - t_frac_dsc_tr(i,j,3) = zero - zrzi_dsc_tr(i,j,3) = zero - end do ! i -end do ! j +do i = pdims%i_start, pdims%i_end + we_lim(i,j,1) = zero + t_frac_tr(i,j,1) = zero + zrzi_tr(i,j,1) = zero + we_lim_dsc(i,j,1) = zero + t_frac_dsc_tr(i,j,1) = zero + zrzi_dsc_tr(i,j,1) = zero + we_lim(i,j,3) = zero + t_frac_tr(i,j,3) = zero + zrzi_tr(i,j,3) = zero + we_lim_dsc(i,j,3) = zero + t_frac_dsc_tr(i,j,3) = zero + zrzi_dsc_tr(i,j,3) = zero +end do ! i !$OMP end do NOWAIT +! end do ! j + + +! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - kent(i,j) = ntml(i,j)+1 - t_frac_tr(i,j,2) = t_frac(i,j) - zrzi_tr(i,j,2) = zrzi(i,j) - if ( t_frac(i,j) > zero ) then - w_s_ent = zero - k = ntml(i,j) - if ( abs( dsl_sml(i,j) ) >= rbl_eps ) w_s_ent = & - min( zero, -sls_inc(i,j,k) * dzl(i,j,k) /dsl_sml(i,j) ) - ! Only allow w_e to be reduced to zero! - we_lim(i,j,2) = rho_mix(i,j,k+1) * & - max( zero, we_parm(i,j) + w_s_ent ) - else - we_lim(i,j,2) = zero - end if - kent_dsc(i,j) = ntdsc(i,j)+1 - t_frac_dsc_tr(i,j,2) = t_frac_dsc(i,j) - zrzi_dsc_tr(i,j,2) = zrzi_dsc(i,j) - if ( t_frac_dsc(i,j) > zero ) then - w_s_ent = zero - k = ntdsc(i,j) - if ( abs( dsl_dsc(i,j) ) >= rbl_eps ) w_s_ent = & - min( zero, -sls_inc(i,j,k) * dzl(i,j,k) /dsl_dsc(i,j) ) - ! Only allow w_e to be reduced to zero! - we_lim_dsc(i,j,2) = rho_mix(i,j,k) * & - max( zero, we_dsc_parm(i,j) + w_s_ent ) - else - we_lim_dsc(i,j,2) = zero - end if - end do +do i = pdims%i_start, pdims%i_end + kent(i,j) = ntml(i,j)+1 + t_frac_tr(i,j,2) = t_frac(i,j) + zrzi_tr(i,j,2) = zrzi(i,j) + if ( t_frac(i,j) > zero ) then + w_s_ent = zero + k = ntml(i,j) + if ( abs( dsl_sml(i,j) ) >= rbl_eps ) w_s_ent = & + min( zero, -sls_inc(i,j,k) * dzl(i,j,k) /dsl_sml(i,j) ) + ! Only allow w_e to be reduced to zero! + we_lim(i,j,2) = rho_mix(i,j,k+1) * & + max( zero, we_parm(i,j) + w_s_ent ) + else + we_lim(i,j,2) = zero + end if + kent_dsc(i,j) = ntdsc(i,j)+1 + t_frac_dsc_tr(i,j,2) = t_frac_dsc(i,j) + zrzi_dsc_tr(i,j,2) = zrzi_dsc(i,j) + if ( t_frac_dsc(i,j) > zero ) then + w_s_ent = zero + k = ntdsc(i,j) + if ( abs( dsl_dsc(i,j) ) >= rbl_eps ) w_s_ent = & + min( zero, -sls_inc(i,j,k) * dzl(i,j,k) /dsl_dsc(i,j) ) + ! Only allow w_e to be reduced to zero! + we_lim_dsc(i,j,2) = rho_mix(i,j,k) * & + max( zero, we_dsc_parm(i,j) + w_s_ent ) + else + we_lim_dsc(i,j,2) = zero + end if end do !$OMP end do NOWAIT +! end do + !----------------------------------------------------------------------- ! 12. Update standard deviations and gradient adjustment to use this ! timestep's ZH (code from SF_EXCH) !----------------------------------------------------------------------- + +! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) -do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( unstable(i,j) ) then - if (flux_grad == Locketal2000) then - w_s_cubed = 0.25_r_bl * zh(i,j) * fb_surf(i,j) - if (w_s_cubed > zero) then - w_m = & - ( w_s_cubed + v_s(i,j) * v_s(i,j) * v_s(i,j) ) ** one_third - t1_sd(i,j) = 1.93_r_bl * ftl(i,j,1) / (rhostar_gb(i,j) * w_m) - q1_sd(i,j) = 1.93_r_bl * fqw(i,j,1) / (rhostar_gb(i,j) * w_m) - tv1_sd(i,j) = t(i,j,1) * & - ( one + c_virtual*q(i,j,1) - qcl(i,j,1) - qcf(i,j,1) ) * & - ( bt(i,j,1)*t1_sd(i,j) + bq(i,j,1)*q1_sd(i,j) ) - t1_sd(i,j) = max ( zero , t1_sd(i,j) ) - q1_sd(i,j) = max ( zero , q1_sd(i,j) ) - if (tv1_sd(i,j) <= zero) then - tv1_sd(i,j) = zero - t1_sd(i,j) = zero - q1_sd(i,j) = zero - end if +do i = pdims%i_start, pdims%i_end + if ( unstable(i,j) ) then + if (flux_grad == Locketal2000) then + w_s_cubed = 0.25_r_bl * zh(i,j) * fb_surf(i,j) + if (w_s_cubed > zero) then + w_m = & + ( w_s_cubed + v_s(i,j) * v_s(i,j) * v_s(i,j) ) ** one_third + t1_sd(i,j) = 1.93_r_bl * ftl(i,j,1) / (rhostar_gb(i,j) * w_m) + q1_sd(i,j) = 1.93_r_bl * fqw(i,j,1) / (rhostar_gb(i,j) * w_m) + tv1_sd(i,j) = t(i,j,1) * & + ( one + c_virtual*q(i,j,1) - qcl(i,j,1) - qcf(i,j,1) ) * & + ( bt(i,j,1)*t1_sd(i,j) + bq(i,j,1)*q1_sd(i,j) ) + t1_sd(i,j) = max ( zero , t1_sd(i,j) ) + q1_sd(i,j) = max ( zero , q1_sd(i,j) ) + if (tv1_sd(i,j) <= zero) then + tv1_sd(i,j) = zero + t1_sd(i,j) = zero + q1_sd(i,j) = zero end if - grad_t_adj(i,j) = min( max_t_grad , & - a_grad_adj * t1_sd(i,j) / zh(i,j) ) - grad_q_adj(i,j) = zero - else if (flux_grad == HoltBov1993) then - ! Use constants from Holtslag and Boville (1993) - ! Conv limit GAMMA_TH = 10 *FTL1/(wstar*zh) - ! Neut limit GAMMA_TH = 7.2*wstar*FTL1/(ustar^2*zh) - wstar3 = fb_surf(i,j) * zh(i,j) - w_m =( v_s(i,j)**3 + 0.6_r_bl*wstar3 )**one_third - - grad_t_adj(i,j) = a_ga_hb93*(wstar3**one_third)*ftl(i,j,1) & - / ( rhostar_gb(i,j)*w_m*w_m*zh(i,j) ) - ! GRAD_Q_ADJ(I,j) = A_GA_HB93*(WSTAR3**one_third)*FQW(I,j,1) - ! / ( RHOSTAR_GB(I,j)*W_M*W_M*ZH(I,j) ) - ! Set q term to zero for same empirical reasons as Lock et al - grad_q_adj(i,j) = zero - else if (flux_grad == LockWhelan2006) then - ! Use constants LockWhelan2006 - ! Conv limit GAMMA_TH = 10 *FTL1/(wstar*zh) - ! Neut limit GAMMA_TH = 7.5*FTL1/(ustar*zh) - wstar3 = fb_surf(i,j) * zh(i,j) - w_h =( ((4.0_r_bl/3.0_r_bl)*v_s(i,j))**3 + wstar3 )**one_third - - grad_t_adj(i,j) = a_ga_lw06 * ftl(i,j,1) & - / ( rhostar_gb(i,j)*w_h*zh(i,j) ) - grad_q_adj(i,j) = a_ga_lw06 * fqw(i,j,1) & - / ( rhostar_gb(i,j)*w_h*zh(i,j) ) end if - end if ! test on UNSTABLE - end do + grad_t_adj(i,j) = min( max_t_grad , & + a_grad_adj * t1_sd(i,j) / zh(i,j) ) + grad_q_adj(i,j) = zero + else if (flux_grad == HoltBov1993) then + ! Use constants from Holtslag and Boville (1993) + ! Conv limit GAMMA_TH = 10 *FTL1/(wstar*zh) + ! Neut limit GAMMA_TH = 7.2*wstar*FTL1/(ustar^2*zh) + wstar3 = fb_surf(i,j) * zh(i,j) + w_m =( v_s(i,j)**3 + 0.6_r_bl*wstar3 )**one_third + + grad_t_adj(i,j) = a_ga_hb93*(wstar3**one_third)*ftl(i,j,1) & + / ( rhostar_gb(i,j)*w_m*w_m*zh(i,j) ) + ! GRAD_Q_ADJ(I,j) = A_GA_HB93*(WSTAR3**one_third)*FQW(I,j,1) + ! / ( RHOSTAR_GB(I,j)*W_M*W_M*ZH(I,j) ) + ! Set q term to zero for same empirical reasons as Lock et al + grad_q_adj(i,j) = zero + else if (flux_grad == LockWhelan2006) then + ! Use constants LockWhelan2006 + ! Conv limit GAMMA_TH = 10 *FTL1/(wstar*zh) + ! Neut limit GAMMA_TH = 7.5*FTL1/(ustar*zh) + wstar3 = fb_surf(i,j) * zh(i,j) + w_h =( ((4.0_r_bl/3.0_r_bl)*v_s(i,j))**3 + wstar3 )**one_third + + grad_t_adj(i,j) = a_ga_lw06 * ftl(i,j,1) & + / ( rhostar_gb(i,j)*w_h*zh(i,j) ) + grad_q_adj(i,j) = a_ga_lw06 * fqw(i,j,1) & + / ( rhostar_gb(i,j)*w_h*zh(i,j) ) + end if + end if ! test on UNSTABLE end do !$OMP end do NOWAIT +! end do + ! (Note, water tracers assume flux_grad = Locketal2000 so no need to ! update wtrac_bl%grad_q_adj as it is always zero) @@ -4903,23 +4980,25 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- if (BL_diag%l_dzh) then -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - ! fill unset values (rmdi<0) with zero - ! and in cumulus set dzh=zh-z_lcl - if (kprof_cu >= on .and. cumulus(i,j)) then - BL_diag%dzh(i,j)= max( zero, zh(i,j)-z_lcl(i,j) ) - else - BL_diag%dzh(i,j)= max( zero, dzh(i,j) ) - end if - end do + + !do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + ! fill unset values (rmdi<0) with zero + ! and in cumulus set dzh=zh-z_lcl + if (kprof_cu >= on .and. cumulus(i,j)) then + BL_diag%dzh(i,j)= max( zero, zh(i,j)-z_lcl(i,j) ) + else + BL_diag%dzh(i,j)= max( zero, dzh(i,j) ) + end if end do -!$OMP end do NOWAIT + !$OMP end do NOWAIT + !end do end if if (BL_diag%l_dscbase) then -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end + + ! do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( dsc(i,j) ) then BL_diag%dscbase(i,j)= zhsc(i,j)-dscdepth(i,j) @@ -4927,43 +5006,50 @@ subroutine kmkhz_9c ( & BL_diag%dscbase(i,j)= rmdi end if end do - end do -!$OMP end do NOWAIT + !$OMP end do NOWAIT + ! end do + end if if (BL_diag%l_cldbase) then -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( dsc(i,j) ) then - BL_diag%cldbase(i,j)= zhsc(i,j)-zc_dsc(i,j) - else - BL_diag%cldbase(i,j)= zh(i,j)-zc(i,j) - end if - end do + + ! do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + if ( dsc(i,j) ) then + BL_diag%cldbase(i,j)= zhsc(i,j)-zc_dsc(i,j) + else + BL_diag%cldbase(i,j)= zh(i,j)-zc(i,j) + end if end do -!$OMP end do NOWAIT + !$OMP end do NOWAIT + ! end do + end if if (BL_diag%l_weparm_dsc) then -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - if ( dsc(i,j) ) then - BL_diag%weparm_dsc(i,j)= we_dsc_parm(i,j) - else - BL_diag%weparm_dsc(i,j)= we_parm(i,j) - end if - end do + + ! do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + if ( dsc(i,j) ) then + BL_diag%weparm_dsc(i,j)= we_dsc_parm(i,j) + else + BL_diag%weparm_dsc(i,j)= we_parm(i,j) + end if end do -!$OMP end do NOWAIT + !$OMP end do NOWAIT + ! end do + end if if (BL_diag%l_weparm) then -!$OMP do SCHEDULE(STATIC) - do j = pdims%j_start, pdims%j_end - do i = pdims%i_start, pdims%i_end - BL_diag%weparm(i,j)= we_parm(i,j) - end do + + !do j = pdims%j_start, pdims%j_end + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + BL_diag%weparm(i,j)= we_parm(i,j) end do -!$OMP end do NOWAIT + !$OMP end do NOWAIT + !end do + end if !----------------------------------------------------------------------- From 43ad9b493c7c34a779a50521fc46381b105c9ecc Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Wed, 21 Jan 2026 10:59:20 +0000 Subject: [PATCH 02/14] All of j squashed --- science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 index 6f8e286c9..dc9028d44 100644 --- a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 +++ b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 @@ -1707,7 +1707,7 @@ subroutine kmkhz_9c ( & end if end do ! !$OMP end do NOWAIT - !$OMP end do + !$OMP end do NOWAIT !end do end if ! test on sc_diag_opt @@ -3873,7 +3873,6 @@ subroutine kmkhz_9c ( & ! Repeat for water tracers if (l_wtrac) then do i_wt = 1, n_wtrac - ! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -3885,7 +3884,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do ! end do - end do end if From 7d04b5751a5a933e0b8dfcfe17947e3c43166b0c Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Tue, 27 Jan 2026 15:42:33 +0000 Subject: [PATCH 03/14] Capture hopeful fix --- rose-stem/site/meto/groups/groups_lfric_atm.cylc | 5 +++++ science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/rose-stem/site/meto/groups/groups_lfric_atm.cylc b/rose-stem/site/meto/groups/groups_lfric_atm.cylc index 444670968..5566752fd 100644 --- a/rose-stem/site/meto/groups/groups_lfric_atm.cylc +++ b/rose-stem/site/meto/groups/groups_lfric_atm.cylc @@ -222,6 +222,11 @@ "lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit", "lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit", ], + "ex1a_omp_C48_cce_full": [ + "lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_full-debug-32bit", + "lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit", + "lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_full-debug-32bit", + ], "ex1a_omp_C48_cce": [ "lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit", "lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit", diff --git a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 index dc9028d44..9adb32dea 100644 --- a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 +++ b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 @@ -2590,11 +2590,11 @@ subroutine kmkhz_9c ( & !do j = pdims%j_start, pdims%j_end !$OMP PARALLEL DEFAULT(SHARED) & -!$OMP private (i, ii, i_wt, k, kl, km, kp, kp2, kmax, wstar3, c_ws, w_m, & +!$OMP private (i, ii, i_wt, k, kl, km, kp, kp2, kmax, wstar3, c_ws, w_m, & !$OMP pr_neut, w_h, k_cff, virt_factor, z_cbase , zdsc_cbase, dsl_ga, & !$OMP dqw_ga, cfl_ml, cff_ml, dqw, dsl, dqcl, dqcf, db_disc, cu_depth_fac, & !$OMP k_rad_lim, z_rad_lim ,dfsw_inv, dflw_inv, dfsw_top, dsldz, cf_for_wb, & -!$OMP grad_t_adj_inv_rdz, grad_q_adj_inv_rdz) +!$OMP grad_t_adj_inv_rdz, grad_q_adj_inv_rdz, denom) !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end From 59ac82bb8d0bba6f0ae41543c0d80ddd9bff3517 Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Tue, 27 Jan 2026 16:32:55 +0000 Subject: [PATCH 04/14] Add KGOs for tests, currently holding with j squash --- ...p_gal9_noukca_1T-C48_MG_ex1a_cce_full-debug-32bit.txt | 9 +++++++++ ...p_gal9_noukca_4T-C48_MG_ex1a_cce_full-debug-32bit.txt | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_full-debug-32bit.txt create mode 100644 rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_full-debug-32bit.txt diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_full-debug-32bit.txt new file mode 100644 index 000000000..ecdac22fe --- /dev/null +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_full-debug-32bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 48D7FB47 +Inner product checksum theta = 5392A6D6 +Inner product checksum u = 6A97B5F7 +Inner product checksum mr1 = 41CCED78 +Inner product checksum mr2 = 39CD58A2 +Inner product checksum mr3 = 37A6C0C1 +Inner product checksum mr4 = 3970B330 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_full-debug-32bit.txt new file mode 100644 index 000000000..4dce97887 --- /dev/null +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_full-debug-32bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 48D7FB59 +Inner product checksum theta = 5392A6CA +Inner product checksum u = 6A97B3E6 +Inner product checksum mr1 = 41CCEE63 +Inner product checksum mr2 = 39D05F5C +Inner product checksum mr3 = 37A7FEC3 +Inner product checksum mr4 = 3970D685 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 From 30f621e66611fcac133bb6b21e53d29206d1bf66 Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Wed, 4 Feb 2026 10:18:58 +0000 Subject: [PATCH 05/14] Add blocking behaviour which improves performance --- .../source/boundary_layer/kmkhz_9c.F90 | 1602 +++++++++-------- 1 file changed, 817 insertions(+), 785 deletions(-) diff --git a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 index 9adb32dea..de50501c1 100644 --- a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 +++ b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 @@ -1210,7 +1210,8 @@ subroutine kmkhz_9c ( & !$OMP end do !end do ! j -!$OMP do SCHEDULE(STATIC) +! Convert to dynamic +!$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do k = 2, bl_levels-1 do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) @@ -1242,7 +1243,7 @@ subroutine kmkhz_9c ( & end if !end do end do - end do + end do !i end do !ii !$OMP end do end if ! l_wtrac @@ -1772,42 +1773,44 @@ subroutine kmkhz_9c ( & !--------------------------------------------------------------------- !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) - do i = pdims%i_start, pdims%i_end - !------------------------------------------------------------- - ! Find k_cloud_dsct as the equivalent to ntdsc (the top level - ! of the DSC) seen by radiation, which we take as the level two - ! levels below the lowest level with free tropospheric radiative - ! cooling. This is done by finding the level with maximum LW - ! cooling, below z_rad_lim and above the SML and 0.5*ZHSC - ! (ie, restrict search to `close' to ZHSC) - ! Necessary as radiation is not usually called every timestep. - !------------------------------------------------------------- - if ( dsc(i,j) .and. ntdsc(i,j)+2 <= bl_levels ) then - z_rad_lim = max( z_tq(i,j,ntdsc(i,j)+2)+0.1_r_bl, 1.2_r_bl*zhsc(i,j) ) - - k = ntml(i,j)+2 - do while (z_tq(i,j,k) < z_rad_lim .and. k < bl_levels) - if ( z_tq(i,j,k) > one_half*zhsc(i,j) & - .and. dflw_over_cp(i,j,k) > df_dsct_over_cp(i,j) ) then - k_cloud_dsct(i,j) = k - df_dsct_over_cp(i,j) = dflw_over_cp(i,j,k) + do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + !------------------------------------------------------------- + ! Find k_cloud_dsct as the equivalent to ntdsc (the top level + ! of the DSC) seen by radiation, which we take as the level two + ! levels below the lowest level with free tropospheric radiative + ! cooling. This is done by finding the level with maximum LW + ! cooling, below z_rad_lim and above the SML and 0.5*ZHSC + ! (ie, restrict search to `close' to ZHSC) + ! Necessary as radiation is not usually called every timestep. + !------------------------------------------------------------- + if ( dsc(i,j) .and. ntdsc(i,j)+2 <= bl_levels ) then + z_rad_lim = max( z_tq(i,j,ntdsc(i,j)+2)+0.1_r_bl, 1.2_r_bl*zhsc(i,j) ) + + k = ntml(i,j)+2 + do while (z_tq(i,j,k) < z_rad_lim .and. k < bl_levels) + if ( z_tq(i,j,k) > one_half*zhsc(i,j) & + .and. dflw_over_cp(i,j,k) > df_dsct_over_cp(i,j) ) then + k_cloud_dsct(i,j) = k + df_dsct_over_cp(i,j) = dflw_over_cp(i,j,k) + end if + k = k+1 + end do ! k + ! Set K_CLOUD_DSCT to the level below if DF in the level + ! above is less than 1.5 times the level above that + ! (implies K_CLOUD_DSCT+1 is typical of free trop so + ! K_CLOUD_DSCT must be inversion level, instead of ntdsc). + ! DF in level K_CLOUD_DSCT+1 is then included as DF_INV_DSC + ! (see below). + k = k_cloud_dsct(i,j) + if ( k > 1 .and. k < bl_levels -1 ) then + if (dflw_over_cp(i,j,k+1) < 1.5_r_bl*dflw_over_cp(i,j,k+2)) & + k_cloud_dsct(i,j) = k-1 end if - k = k+1 - end do ! k - ! Set K_CLOUD_DSCT to the level below if DF in the level - ! above is less than 1.5 times the level above that - ! (implies K_CLOUD_DSCT+1 is typical of free trop so - ! K_CLOUD_DSCT must be inversion level, instead of ntdsc). - ! DF in level K_CLOUD_DSCT+1 is then included as DF_INV_DSC - ! (see below). - k = k_cloud_dsct(i,j) - if ( k > 1 .and. k < bl_levels -1 ) then - if (dflw_over_cp(i,j,k+1) < 1.5_r_bl*dflw_over_cp(i,j,k+2)) & - k_cloud_dsct(i,j) = k-1 - end if - end if ! DSC test separated out + end if ! DSC test separated out - end do ! i + end do ! i + end do ! ii !$OMP end do !----------------------------------------------------------------- ! Find bottom grid-level (K_LEVEL) for cloud-top radiative flux @@ -1816,21 +1819,23 @@ subroutine kmkhz_9c ( & ! in order to generate turbulence. !----------------------------------------------------------------- !$OMP do SCHEDULE(DYNAMIC) - do i = pdims%i_start, pdims%i_end - k_level(i,j) = k_cloud_dsct(i,j) - if ( k_cloud_dsct(i,j) > 1 ) then - k_rad_lim = ntml(i,j)+1 - k=k_cloud_dsct(i,j)-1 - kl=max(1,k) ! only to avoid out-of-bounds compiler warning - do while ( k > k_rad_lim & - .and. dflw_over_cp(i,j,kl) > zero & - .and. z_tq(i,j,kl) > one_half*zhsc(i,j) ) - k_level(i,j) = k - k = k-1 - kl=max(1,k) - end do ! k - end if - end do ! i + do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + k_level(i,j) = k_cloud_dsct(i,j) + if ( k_cloud_dsct(i,j) > 1 ) then + k_rad_lim = ntml(i,j)+1 + k=k_cloud_dsct(i,j)-1 + kl=max(1,k) ! only to avoid out-of-bounds compiler warning + do while ( k > k_rad_lim & + .and. dflw_over_cp(i,j,kl) > zero & + .and. z_tq(i,j,kl) > one_half*zhsc(i,j) ) + k_level(i,j) = k + k = k-1 + kl=max(1,k) + end do ! k + end if + end do ! i + end do ! ii !$OMP end do !end do ! j !##### @@ -1842,31 +1847,33 @@ subroutine kmkhz_9c ( & !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) - do i = pdims%i_start, pdims%i_end - !------------------------------------------------------------- - ! Find the layer with the greatest LW radiative flux jump in - ! the upper half of the boundary layer and assume that this - ! marks the top of the DSC layer. - ! Necessary as radiation is not usually called every timestep. - !------------------------------------------------------------- - ! Limit the search to above the SML. - k_rad_lim = ntml(i,j)+2 - - do k = max(1,k_rad_lim), min(bl_levels,ntdsc(i,j)+2) - - if ( dsc(i,j) .and. z_tq(i,j,k) > one_half*zhsc(i,j) & - .and. dflw_over_cp(i,j,k) > df_dsct_over_cp(i,j) ) then - k_cloud_dsct(i,j) = k - ! Set K_CLOUD_DSCT to the level below if its DF is greater - ! than half the maximum. DF in level K_CLOUD_DSCT+1 is then - ! included as DF_INV_DSC below. - if (dflw_over_cp(i,j,k-1) > one_half*dflw_over_cp(i,j,k)) & - k_cloud_dsct(i,j) = k-1 - df_dsct_over_cp(i,j) = dflw_over_cp(i,j,k) - end if + do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + !------------------------------------------------------------- + ! Find the layer with the greatest LW radiative flux jump in + ! the upper half of the boundary layer and assume that this + ! marks the top of the DSC layer. + ! Necessary as radiation is not usually called every timestep. + !------------------------------------------------------------- + ! Limit the search to above the SML. + k_rad_lim = ntml(i,j)+2 - end do ! k - end do ! i + do k = max(1,k_rad_lim), min(bl_levels,ntdsc(i,j)+2) + + if ( dsc(i,j) .and. z_tq(i,j,k) > one_half*zhsc(i,j) & + .and. dflw_over_cp(i,j,k) > df_dsct_over_cp(i,j) ) then + k_cloud_dsct(i,j) = k + ! Set K_CLOUD_DSCT to the level below if its DF is greater + ! than half the maximum. DF in level K_CLOUD_DSCT+1 is then + ! included as DF_INV_DSC below. + if (dflw_over_cp(i,j,k-1) > one_half*dflw_over_cp(i,j,k)) & + k_cloud_dsct(i,j) = k-1 + df_dsct_over_cp(i,j) = dflw_over_cp(i,j,k) + end if + + end do ! k + end do ! i + end do ! ii !$OMP end do !----------------------------------------------------------------- ! Find bottom grid-level (K_LEVEL) for cloud-top radiative flux @@ -1875,21 +1882,23 @@ subroutine kmkhz_9c ( & ! in order to generate turbulence. !----------------------------------------------------------------- !$OMP do SCHEDULE(DYNAMIC) - do i = pdims%i_start, pdims%i_end - k_level(i,j) = k_cloud_dsct(i,j) - if ( k_cloud_dsct(i,j) > 1 ) then - k_rad_lim = ntml(i,j)+1 - k=k_cloud_dsct(i,j)-1 - kl=max(1,k) ! only to avoid out-of-bounds compiler warning - do while ( k > k_rad_lim & - .and. dflw_over_cp(i,j,kl) > zero & - .and. z_tq(i,j,kl) > one_half*zhsc(i,j) ) - k_level(i,j) = k - k = k-1 - kl=max(1,k) - end do ! k - end if - end do ! i + do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + k_level(i,j) = k_cloud_dsct(i,j) + if ( k_cloud_dsct(i,j) > 1 ) then + k_rad_lim = ntml(i,j)+1 + k=k_cloud_dsct(i,j)-1 + kl=max(1,k) ! only to avoid out-of-bounds compiler warning + do while ( k > k_rad_lim & + .and. dflw_over_cp(i,j,kl) > zero & + .and. z_tq(i,j,kl) > one_half*zhsc(i,j) ) + k_level(i,j) = k + k = k-1 + kl=max(1,k) + end do ! k + end if + end do ! i + end do ! ii !$OMP end do !end do ! j @@ -1905,48 +1914,50 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------- !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) -do i = pdims%i_start, pdims%i_end +do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) - if ( k_cloud_dsct(i,j) > 0 ) then - dflw_inv = zero - dfsw_inv = zero - if ( k_cloud_dsct(i,j) < bl_levels ) then - k = k_cloud_dsct(i,j)+1 - if ( k < bl_levels ) then - dflw_inv = dflw_over_cp(i,j,k) & - - dflw_over_cp(i,j,k+1) & - * dzl(i,j,k)/dzl(i,j,k+1) - dfsw_inv = dfsw_over_cp(i,j,k) & - - dfsw_over_cp(i,j,k+1) & - * dzl(i,j,k)/dzl(i,j,k+1) - else - dflw_inv = dflw_over_cp(i,j,k) - dfsw_inv = dfsw_over_cp(i,j,k) + if ( k_cloud_dsct(i,j) > 0 ) then + dflw_inv = zero + dfsw_inv = zero + if ( k_cloud_dsct(i,j) < bl_levels ) then + k = k_cloud_dsct(i,j)+1 + if ( k < bl_levels ) then + dflw_inv = dflw_over_cp(i,j,k) & + - dflw_over_cp(i,j,k+1) & + * dzl(i,j,k)/dzl(i,j,k+1) + dfsw_inv = dfsw_over_cp(i,j,k) & + - dfsw_over_cp(i,j,k+1) & + * dzl(i,j,k)/dzl(i,j,k+1) + else + dflw_inv = dflw_over_cp(i,j,k) + dfsw_inv = dfsw_over_cp(i,j,k) + end if + dflw_inv = max( dflw_inv, zero ) + dfsw_inv = min( dfsw_inv, zero ) end if - dflw_inv = max( dflw_inv, zero ) - dfsw_inv = min( dfsw_inv, zero ) - end if - df_inv_dsc(i,j) = dflw_inv + dfsw_inv + df_inv_dsc(i,j) = dflw_inv + dfsw_inv - df_dsct_over_cp(i,j) = frad_lw(i,j,k_cloud_dsct(i,j)+1) & - - frad_lw(i,j,k_level(i,j)) & - + dflw_inv + df_dsct_over_cp(i,j) = frad_lw(i,j,k_cloud_dsct(i,j)+1) & + - frad_lw(i,j,k_level(i,j)) & + + dflw_inv - dfsw_top = frad_sw(i,j,k_cloud_dsct(i,j)+1) & - - frad_sw(i,j,k_level(i,j)) & - + dfsw_inv + dfsw_top = frad_sw(i,j,k_cloud_dsct(i,j)+1) & + - frad_sw(i,j,k_level(i,j)) & + + dfsw_inv - !----------------------------------------------------------- - ! Combine SW and LW cloud-top divergences into a net - ! divergence by estimating SW flux divergence at a given - ! LW divergence = DF_SW * (1-exp{-A*kappa_sw/kappa_lw}) - ! Empirically (from LEM data) a reasonable fit is found - ! with A small and (1-exp{-A*kappa_sw/kappa_lw}) = dfsw_frac - !----------------------------------------------------------- - df_dsct_over_cp(i,j) = max( zero, & - df_dsct_over_cp(i,j) + dfsw_frac * dfsw_top ) - end if -end do + !----------------------------------------------------------- + ! Combine SW and LW cloud-top divergences into a net + ! divergence by estimating SW flux divergence at a given + ! LW divergence = DF_SW * (1-exp{-A*kappa_sw/kappa_lw}) + ! Empirically (from LEM data) a reasonable fit is found + ! with A small and (1-exp{-A*kappa_sw/kappa_lw}) = dfsw_frac + !----------------------------------------------------------- + df_dsct_over_cp(i,j) = max( zero, & + df_dsct_over_cp(i,j) + dfsw_frac * dfsw_top ) + end if + end do !i +end do !ii !$OMP end do !end do @@ -1991,8 +2002,8 @@ subroutine kmkhz_9c ( & nbdsc(i,j) = k+1 ! marks lowest level within ML end if end do ! k - !end do ! i - end do ! j + !end do ! j + end do ! i end do !ii !$OMP end do !---------------------------------------------------------------------- @@ -2155,273 +2166,94 @@ subroutine kmkhz_9c ( & !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) -do i = pdims%i_start, pdims%i_end - - if (l_wtrac) then - dqw_sml_meth(i,j) = 0 - qw_lapse_zero_sml(i,j) = .false. - end if - - sml_disc_inv(i,j) = 0 ! initialise flags to indicate whether a - dsc_disc_inv(i,j) = 0 ! discontinuous inversion is diagnosed - res_inv(i,j) = 0 ! Flag for whether inversion is resolved - if ( bl_res_inv /= off .and. .not. cumulus(i,j) .and. & - dzh(i,j) > one .and. ntml(i,j)+2 <= bl_levels ) then - if (zh(i,j)+dzh(i,j) > z_uv(i,j,ntml(i,j)+2) ) res_inv(i,j) = 1 - end if - - !..First interpolate to find ZH - - k = ntml(i,j) - !..by default, keep ZH at the half-level where it was diagnosed - !..initially and use grid-level jumps - - dsl_sml(i,j) = sl(i,j,k+1) - sl(i,j,k) - dqw_sml(i,j) = qw(i,j,k+1) - qw(i,j,k) - - if ( .not. cumulus(i,j) .and. .not. coupled(i,j) .and. & - res_inv(i,j) == 0 .and. k > 1 .and. k <= bl_levels-2 ) then - - ! Require SVL and SL to be monotonically increasing - ! and QW to be simply monotonic - monotonic_inv = ( svl(i,j,k+2) > svl(i,j,k+1) .and. & - svl(i,j,k+1) > svl(i,j,k) ) & - .and. ( sl(i,j,k+2) > sl(i,j,k+1) .and. & - sl(i,j,k+1) > sl(i,j,k) ) & - .and. ( ( qw(i,j,k+2) > qw(i,j,k+1) .and. & - qw(i,j,k+1) > qw(i,j,k) ) & - .or. ( qw(i,j,k+2) < qw(i,j,k+1) .and. & - qw(i,j,k+1) < qw(i,j,k) ) ) - - if ( monotonic_inv ) then - - if ( k <= bl_levels-3 ) then - ! need to test for K+1 to K+2 gradient in case profile is - ! concave (would mess up the inversion diagnosis so best - ! just to ignore lapse) - svl_lapse = max(zero, & - ( svl(i,j,k+3) - svl(i,j,k+2) ) * rdz(i,j,k+3) ) - if ( svl_lapse > & - ( svl(i,j,k+2) - svl(i,j,k+1) ) * rdz(i,j,k+2) ) & - svl_lapse = zero - else - svl_lapse = zero - end if - if ( k >= k_plume(i,j)+2 ) then - ! Use mean mixed layer gradient (if resolved) to allow - ! for stablisation by gradient-adjustment - ! Ignore level K in case inversion is dropping - svl_lapse_base = ( svl(i,j,k-1)-svl(i,j,k_plume(i,j)) )/ & - (z_tq(i,j,k-1)-z_tq(i,j,k_plume(i,j))) - svl_lapse_base = max( zero, svl_lapse_base ) - else - svl_lapse_base = zero - end if - - quad_a = one_half*( svl_lapse - svl_lapse_base ) - quad_bm = svl(i,j,k+2) - svl(i,j,k) & - - svl_lapse * ( z_tq(i,j,k+2)-z_uv(i,j,k+2) ) & - - svl_lapse_base * ( z_uv(i,j,k+1)-z_tq(i,j,k) + & - dzl(i,j,k+1) ) - quad_c = dzl(i,j,k+1)*( svl(i,j,k+1) - svl(i,j,k) - & - svl_lapse_base * ( & - z_uv(i,j,k+1)-z_tq(i,j,k) + one_half*dzl(i,j,k+1) ) ) - - if ( quad_bm > zero ) then - if ( quad_c <= zero) then - ! SVL extrapolated from K to K+1 is greater than - ! the level K+1 value - inversion needs to rise so - ! place it as high as possible - dz_disc = dz_disc_min - else if ( quad_bm*quad_bm >= 4.0_r_bl*quad_a*quad_c ) then - ! solve equation for DZ_DISC... - if ( abs(quad_a) >= rbl_eps ) then - ! ...quadratic if QUAD_A /= 0 - dz_disc = ( quad_bm - sqrt( quad_bm*quad_bm & - - 4.0_r_bl*quad_a*quad_c ) & - ) / (2.0_r_bl*quad_a) - else - ! ...linear if QUAD_A == 0 - dz_disc = quad_c / quad_bm - end if - else - dz_disc = 99999.9_r_bl ! large dummy value - end if - - if ( dz_disc > 0.9_r_bl * dzl(i,j,k+1) ) then - ! ZH diagnosed very close to or below Z_UV(K+1): - if ( svl(i,j,k)-svl(i,j,k-1) > zero) then - ! top of ML stably stratified so lower NTML but - ! set ZH only fractionally (DZ_DISC_MIN) - ! below the top of the inversion level. - ntml(i,j) = ntml(i,j) - 1 - k=ntml(i,j) - dz_disc = dz_disc_min - else - ! top of ML well-mixed so don't lower the inversion - ! level but set ZH just (DZ_DISC_MIN) above the - ! half-level to allow the inversion to subside if - ! necessary. - dz_disc = dzl(i,j,k+1) - dz_disc_min - end if - end if - - else - !.. ignoring lapse rates - dsvl_top = svl(i,j,k+2) - svl(i,j,k) - dz_disc = dzl(i,j,k+1) * & - (svl(i,j,k+1)-svl(i,j,k)) / dsvl_top - end if - - zh(i,j) = z_uv(i,j,k+2) - dz_disc - sml_disc_inv(i,j) = 1 ! set flag to indicate disc inv found - - !----------------------------------------------------------- - !..Calculate SML inversion discontinuous jumps of SL and QW - !----------------------------------------------------------- - ! Allow for lapse rate above inversion, if known - dz_disc = z_tq(i,j,k+2) - zh(i,j) - sl_lapse = zero - qw_lapse = zero - if ( k <= bl_levels-3 ) then - sl_lapse = max( zero, & - ( sl(i,j,k+3) - sl(i,j,k+2) )*rdz(i,j,k+3) ) - qw_lapse = min( zero, & - ( qw(i,j,k+3) - qw(i,j,k+2) )*rdz(i,j,k+3) ) - - if (l_wtrac) then ! Store method - if (qw_lapse >= 0.0) then - qw_lapse_zero_sml(i,j) = .true. - end if - end if - - end if +do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) - !----------------- - ! First SL jump - !----------------- - ! Only reduce 2 level jump by at most half - dsl_sml(i,j) = sl(i,j,k+2) - sl(i,j,k) - dsl_sml(i,j) = dsl_sml(i,j) - & - min( one_half*dsl_sml(i,j), sl_lapse*dz_disc ) - !----------------- - ! Next QW jump - !----------------- - if ( qw(i,j,k+2) < qw(i,j,k+1) .and. & - qw(i,j,k+1) < qw(i,j,k) ) then - ! QW monotonically decreasing across inversion - ! Only allow for QW lapse rate if both it and the - ! 2 grid-level jump are negative (expected sign) - dqw_sml(i,j) = qw(i,j,k+2) - qw(i,j,k) - if (l_wtrac) dqw_sml_meth(i,j) = 1 - - if ( dqw_sml(i,j) < zero ) then - if (l_wtrac) then ! Store method - if (one_half*dqw_sml(i,j) > qw_lapse*dz_disc) then - dqw_sml_meth(i,j) = 2 - else - dqw_sml_meth(i,j) = 3 - end if - end if - dqw_sml(i,j) = dqw_sml(i,j) - & - max( one_half*dqw_sml(i,j), qw_lapse*dz_disc ) - end if - else if ( qw(i,j,k+2) > qw(i,j,k+1) .and. & - qw(i,j,k+1) > qw(i,j,k) ) then - ! QW monotonically increasing across inversion - ! Suggests something unusual is going so not clear how - ! to proceed, so currently leaving DQW as 2 level jump - dqw_sml(i,j) = qw(i,j,k+2) - qw(i,j,k) - if (l_wtrac) dqw_sml_meth(i,j) = 1 - end if + if (l_wtrac) then + dqw_sml_meth(i,j) = 0 + qw_lapse_zero_sml(i,j) = .false. + end if - end if ! Monotonic inversion - end if ! not cumulus and not at top of bl_levels + sml_disc_inv(i,j) = 0 ! initialise flags to indicate whether a + dsc_disc_inv(i,j) = 0 ! discontinuous inversion is diagnosed + res_inv(i,j) = 0 ! Flag for whether inversion is resolved + if ( bl_res_inv /= off .and. .not. cumulus(i,j) .and. & + dzh(i,j) > one .and. ntml(i,j)+2 <= bl_levels ) then + if (zh(i,j)+dzh(i,j) > z_uv(i,j,ntml(i,j)+2) ) res_inv(i,j) = 1 + end if - !------------------------------------------------------------------- - !..Second interpolate to find ZHSC - !------------------------------------------------------------------- - if (l_wtrac) then - dqw_dsc_meth(i,j) = 0 - qw_lapse_zero_dsc(i,j) = .false. - end if + !..First interpolate to find ZH - if ( dsc(i,j) ) then - k = ntdsc(i,j) - !..by default, keep ZHSC at the half-level where it was diagnosed + k = ntml(i,j) + !..by default, keep ZH at the half-level where it was diagnosed !..initially and use grid-level jumps - dsl_dsc(i,j) = sl(i,j,k+1) - sl(i,j,k) - dqw_dsc(i,j) = qw(i,j,k+1) - qw(i,j,k) - - if ( k <= bl_levels-2 ) then - - ! Require SVL and SL to be monotonically increasing - ! and QW to be simply monotonic - monotonic_inv = ( svl(i,j,k+2) > svl(i,j,k+1) .and. & - svl(i,j,k+1) > svl(i,j,k) ) & - .and. ( sl(i,j,k+2) > sl(i,j,k+1) .and. & - sl(i,j,k+1) > sl(i,j,k) ) & - .and. ( ( qw(i,j,k+2) > qw(i,j,k+1) .and. & - qw(i,j,k+1) > qw(i,j,k) ) & - .or. ( qw(i,j,k+2) < qw(i,j,k+1) .and. & + + dsl_sml(i,j) = sl(i,j,k+1) - sl(i,j,k) + dqw_sml(i,j) = qw(i,j,k+1) - qw(i,j,k) + + if ( .not. cumulus(i,j) .and. .not. coupled(i,j) .and. & + res_inv(i,j) == 0 .and. k > 1 .and. k <= bl_levels-2 ) then + + ! Require SVL and SL to be monotonically increasing + ! and QW to be simply monotonic + monotonic_inv = ( svl(i,j,k+2) > svl(i,j,k+1) .and. & + svl(i,j,k+1) > svl(i,j,k) ) & + .and. ( sl(i,j,k+2) > sl(i,j,k+1) .and. & + sl(i,j,k+1) > sl(i,j,k) ) & + .and. ( ( qw(i,j,k+2) > qw(i,j,k+1) .and. & + qw(i,j,k+1) > qw(i,j,k) ) & + .or. ( qw(i,j,k+2) < qw(i,j,k+1) .and. & qw(i,j,k+1) < qw(i,j,k) ) ) if ( monotonic_inv ) then - if ( sc_diag_opt == sc_diag_cu_rh_max .or. & - sc_diag_opt == sc_diag_all_rh_max ) then - ! The initial zhsc can be between model-levels rather than exactly - ! on a rho-level. - ! Store height of base of DSC layer - z_cbase = zhsc(i,j) - dscdepth(i,j) - end if - if ( k <= bl_levels-3 ) then ! need to test for K+1 to K+2 gradient in case profile is ! concave (would mess up the inversion diagnosis so best - ! just to ignore) - svl_lapse = max(zero, & - ( svl(i,j,k+3) - svl(i,j,k+2) )*rdz(i,j,k+3) ) - if ( svl_lapse > & - ( svl(i,j,k+2) - svl(i,j,k+1) )*rdz(i,j,k+2) ) & + ! just to ignore lapse) + svl_lapse = max(zero, & + ( svl(i,j,k+3) - svl(i,j,k+2) ) * rdz(i,j,k+3) ) + if ( svl_lapse > & + ( svl(i,j,k+2) - svl(i,j,k+1) ) * rdz(i,j,k+2) ) & svl_lapse = zero else svl_lapse = zero end if - if ( k >= nbdsc(i,j)+2 ) then - ! Use mean mixed layer gradient (if resolved) to allow - ! for stablisation by gradient-adjustment - ! Ignore level K in case inversion is dropping - svl_lapse_base = ( svl(i,j,k-1)-svl(i,j,nbdsc(i,j)) )/ & - (z_tq(i,j,k-1)-z_tq(i,j,nbdsc(i,j))) + if ( k >= k_plume(i,j)+2 ) then + ! Use mean mixed layer gradient (if resolved) to allow + ! for stablisation by gradient-adjustment + ! Ignore level K in case inversion is dropping + svl_lapse_base = ( svl(i,j,k-1)-svl(i,j,k_plume(i,j)) )/ & + (z_tq(i,j,k-1)-z_tq(i,j,k_plume(i,j))) svl_lapse_base = max( zero, svl_lapse_base ) else svl_lapse_base = zero end if quad_a = one_half*( svl_lapse - svl_lapse_base ) - quad_bm = svl(i,j,k+2) - svl(i,j,k) & - - svl_lapse * ( z_tq(i,j,k+2)-z_uv(i,j,k+2) ) & - - svl_lapse_base * ( z_uv(i,j,k+1)-z_tq(i,j,k) + & + quad_bm = svl(i,j,k+2) - svl(i,j,k) & + - svl_lapse * ( z_tq(i,j,k+2)-z_uv(i,j,k+2) ) & + - svl_lapse_base * ( z_uv(i,j,k+1)-z_tq(i,j,k) + & dzl(i,j,k+1) ) - quad_c = dzl(i,j,k+1)*( svl(i,j,k+1) - svl(i,j,k) - & - svl_lapse_base * ( & + quad_c = dzl(i,j,k+1)*( svl(i,j,k+1) - svl(i,j,k) - & + svl_lapse_base * ( & z_uv(i,j,k+1)-z_tq(i,j,k) + one_half*dzl(i,j,k+1) ) ) if ( quad_bm > zero ) then if ( quad_c <= zero) then - ! SVL extrapolated from K to K+1 is greater than - ! the level K+1 value - inversion needs to rise + ! SVL extrapolated from K to K+1 is greater than + ! the level K+1 value - inversion needs to rise so + ! place it as high as possible dz_disc = dz_disc_min else if ( quad_bm*quad_bm >= 4.0_r_bl*quad_a*quad_c ) then - ! solve equation for DZ_DISC... - if ( abs(quad_a) >= rbl_eps ) then - ! ...quadratic if QUAD_A ne 0 - dz_disc = ( quad_bm - sqrt( quad_bm*quad_bm & - - 4.0_r_bl*quad_a*quad_c ) & + ! solve equation for DZ_DISC... + if ( abs(quad_a) >= rbl_eps ) then + ! ...quadratic if QUAD_A /= 0 + dz_disc = ( quad_bm - sqrt( quad_bm*quad_bm & + - 4.0_r_bl*quad_a*quad_c ) & ) / (2.0_r_bl*quad_a) else - ! ...linear if QUAD_A = 0 + ! ...linear if QUAD_A == 0 dz_disc = quad_c / quad_bm end if else @@ -2429,116 +2261,297 @@ subroutine kmkhz_9c ( & end if if ( dz_disc > 0.9_r_bl * dzl(i,j,k+1) ) then - if ( ntdsc(i,j) == 2 ) then - dz_disc = dzl(i,j,k+1) + ! ZH diagnosed very close to or below Z_UV(K+1): + if ( svl(i,j,k)-svl(i,j,k-1) > zero) then + ! top of ML stably stratified so lower NTML but + ! set ZH only fractionally (DZ_DISC_MIN) + ! below the top of the inversion level. + ntml(i,j) = ntml(i,j) - 1 + k=ntml(i,j) + dz_disc = dz_disc_min else - ! ZHSC diagnosed very close to or below Z_UV(K+1): - if ( svl(i,j,k)-svl(i,j,k-1) > zero) then - ! top of ML stably stratified so lower NTDSC but - ! set ZHSC only fractionally (DZ_DISC_MIN) - ! below the top of the inversion level. - ntdsc(i,j) = ntdsc(i,j) - 1 - k=ntdsc(i,j) - dz_disc = dz_disc_min - dscdepth(i,j) = dscdepth(i,j) - dzl(i,j,k+1) - ! Note that all but DZ_DISC_MIN of this layer will - ! be added back on to DSCDEPTH a few lines below - else - ! top of ML well-mixed so don't lower the inversion - ! level but set ZHSC just (DZ_DISC_MIN) above the - ! half-level to allow the inversion to subside if - ! necessary. - dz_disc = dzl(i,j,k+1) - dz_disc_min - end if + ! top of ML well-mixed so don't lower the inversion + ! level but set ZH just (DZ_DISC_MIN) above the + ! half-level to allow the inversion to subside if + ! necessary. + dz_disc = dzl(i,j,k+1) - dz_disc_min end if end if - else ! QUAD_BM le 0 + else !.. ignoring lapse rates dsvl_top = svl(i,j,k+2) - svl(i,j,k) - dz_disc = dzl(i,j,k+1) * & + dz_disc = dzl(i,j,k+1) * & (svl(i,j,k+1)-svl(i,j,k)) / dsvl_top end if - zhsc(i,j) = z_uv(i,j,k+2) - dz_disc - - if ( sc_diag_opt == sc_diag_cu_rh_max .or. & - sc_diag_opt == sc_diag_all_rh_max ) then - ! The initial zhsc can be between model-levels rather than exactly - ! on a rho-level. Assuming height of base of DSC layer stays the - ! same, set new depth based on updated DSC top height: - dscdepth(i,j) = zhsc(i,j) - z_cbase - else - ! The initial zhsc is always at rho-level ntdsc+1; - ! increment the DSC depth consistent with this: - dscdepth(i,j) = dscdepth(i,j) + zhsc(i,j) - z_uv(i,j,k+1) - end if - - dsc_disc_inv(i,j) = 1 ! set flag to indicate disc inv found + zh(i,j) = z_uv(i,j,k+2) - dz_disc + sml_disc_inv(i,j) = 1 ! set flag to indicate disc inv found !----------------------------------------------------------- - !..Calculate DSC inversion discontinuous jumps of SL and QW + !..Calculate SML inversion discontinuous jumps of SL and QW !----------------------------------------------------------- ! Allow for lapse rate above inversion, if known - dz_disc = z_tq(i,j,k+2) - zhsc(i,j) + dz_disc = z_tq(i,j,k+2) - zh(i,j) sl_lapse = zero qw_lapse = zero if ( k <= bl_levels-3 ) then - sl_lapse = max( zero, & + sl_lapse = max( zero, & ( sl(i,j,k+3) - sl(i,j,k+2) )*rdz(i,j,k+3) ) - qw_lapse = min( zero, & + qw_lapse = min( zero, & ( qw(i,j,k+3) - qw(i,j,k+2) )*rdz(i,j,k+3) ) if (l_wtrac) then ! Store method if (qw_lapse >= 0.0) then - qw_lapse_zero_dsc(i,j) = .true. + qw_lapse_zero_sml(i,j) = .true. end if end if end if - !----------------- - ! First SL jump - !----------------- - ! Only reduce 2 level jump by at most half - dsl_dsc(i,j) = sl(i,j,k+2) - sl(i,j,k) - dsl_dsc(i,j) = dsl_dsc(i,j) - & - min( one_half*dsl_dsc(i,j), sl_lapse*dz_disc ) - !----------------- - ! Next QW jump - !----------------- - if ( qw(i,j,k+2) < qw(i,j,k+1) .and. & + !----------------- + ! First SL jump + !----------------- + ! Only reduce 2 level jump by at most half + dsl_sml(i,j) = sl(i,j,k+2) - sl(i,j,k) + dsl_sml(i,j) = dsl_sml(i,j) - & + min( one_half*dsl_sml(i,j), sl_lapse*dz_disc ) + !----------------- + ! Next QW jump + !----------------- + if ( qw(i,j,k+2) < qw(i,j,k+1) .and. & qw(i,j,k+1) < qw(i,j,k) ) then - ! QW monotonically decreasing across inversion - ! Only allow for QW lapse rate if both it and the - ! 2 grid-level jump are negative (expected sign) - dqw_dsc(i,j) = qw(i,j,k+2) - qw(i,j,k) - if (l_wtrac) dqw_dsc_meth(i,j) = 1 - - if ( dqw_dsc(i,j) < zero ) then - if (l_wtrac) then ! Store method - if ( one_half*dqw_dsc(i,j) > qw_lapse*dz_disc ) then - dqw_dsc_meth(i,j) = 2 + ! QW monotonically decreasing across inversion + ! Only allow for QW lapse rate if both it and the + ! 2 grid-level jump are negative (expected sign) + dqw_sml(i,j) = qw(i,j,k+2) - qw(i,j,k) + if (l_wtrac) dqw_sml_meth(i,j) = 1 + + if ( dqw_sml(i,j) < zero ) then + if (l_wtrac) then ! Store method + if (one_half*dqw_sml(i,j) > qw_lapse*dz_disc) then + dqw_sml_meth(i,j) = 2 else - dqw_dsc_meth(i,j) = 3 + dqw_sml_meth(i,j) = 3 end if end if - dqw_dsc(i,j) = dqw_dsc(i,j) - & - max( one_half*dqw_dsc(i,j), qw_lapse*dz_disc ) + dqw_sml(i,j) = dqw_sml(i,j) - & + max( one_half*dqw_sml(i,j), qw_lapse*dz_disc ) end if - else if ( qw(i,j,k+2) > qw(i,j,k+1) .and. & + else if ( qw(i,j,k+2) > qw(i,j,k+1) .and. & qw(i,j,k+1) > qw(i,j,k) ) then - ! QW monotonically increasing across inversion - ! Suggests something unusual is going so not clear how - ! to proceed, so currently leaving DQW as 2 level jump - dqw_dsc(i,j) = qw(i,j,k+2) - qw(i,j,k) - if (l_wtrac) dqw_dsc_meth(i,j) = 1 + ! QW monotonically increasing across inversion + ! Suggests something unusual is going so not clear how + ! to proceed, so currently leaving DQW as 2 level jump + dqw_sml(i,j) = qw(i,j,k+2) - qw(i,j,k) + if (l_wtrac) dqw_sml_meth(i,j) = 1 end if - end if ! monotonic inversion - end if ! test on K lt BL_LEVELS-2 - end if ! test on DSC -end do + end if ! Monotonic inversion + end if ! not cumulus and not at top of bl_levels + + !------------------------------------------------------------------- + !..Second interpolate to find ZHSC + !------------------------------------------------------------------- + if (l_wtrac) then + dqw_dsc_meth(i,j) = 0 + qw_lapse_zero_dsc(i,j) = .false. + end if + + if ( dsc(i,j) ) then + k = ntdsc(i,j) + !..by default, keep ZHSC at the half-level where it was diagnosed + !..initially and use grid-level jumps + dsl_dsc(i,j) = sl(i,j,k+1) - sl(i,j,k) + dqw_dsc(i,j) = qw(i,j,k+1) - qw(i,j,k) + + if ( k <= bl_levels-2 ) then + + ! Require SVL and SL to be monotonically increasing + ! and QW to be simply monotonic + monotonic_inv = ( svl(i,j,k+2) > svl(i,j,k+1) .and. & + svl(i,j,k+1) > svl(i,j,k) ) & + .and. ( sl(i,j,k+2) > sl(i,j,k+1) .and. & + sl(i,j,k+1) > sl(i,j,k) ) & + .and. ( ( qw(i,j,k+2) > qw(i,j,k+1) .and. & + qw(i,j,k+1) > qw(i,j,k) ) & + .or. ( qw(i,j,k+2) < qw(i,j,k+1) .and. & + qw(i,j,k+1) < qw(i,j,k) ) ) + + if ( monotonic_inv ) then + + if ( sc_diag_opt == sc_diag_cu_rh_max .or. & + sc_diag_opt == sc_diag_all_rh_max ) then + ! The initial zhsc can be between model-levels rather than exactly + ! on a rho-level. + ! Store height of base of DSC layer + z_cbase = zhsc(i,j) - dscdepth(i,j) + end if + + if ( k <= bl_levels-3 ) then + ! need to test for K+1 to K+2 gradient in case profile is + ! concave (would mess up the inversion diagnosis so best + ! just to ignore) + svl_lapse = max(zero, & + ( svl(i,j,k+3) - svl(i,j,k+2) )*rdz(i,j,k+3) ) + if ( svl_lapse > & + ( svl(i,j,k+2) - svl(i,j,k+1) )*rdz(i,j,k+2) ) & + svl_lapse = zero + else + svl_lapse = zero + end if + if ( k >= nbdsc(i,j)+2 ) then + ! Use mean mixed layer gradient (if resolved) to allow + ! for stablisation by gradient-adjustment + ! Ignore level K in case inversion is dropping + svl_lapse_base = ( svl(i,j,k-1)-svl(i,j,nbdsc(i,j)) )/ & + (z_tq(i,j,k-1)-z_tq(i,j,nbdsc(i,j))) + svl_lapse_base = max( zero, svl_lapse_base ) + else + svl_lapse_base = zero + end if + + quad_a = one_half*( svl_lapse - svl_lapse_base ) + quad_bm = svl(i,j,k+2) - svl(i,j,k) & + - svl_lapse * ( z_tq(i,j,k+2)-z_uv(i,j,k+2) ) & + - svl_lapse_base * ( z_uv(i,j,k+1)-z_tq(i,j,k) + & + dzl(i,j,k+1) ) + quad_c = dzl(i,j,k+1)*( svl(i,j,k+1) - svl(i,j,k) - & + svl_lapse_base * ( & + z_uv(i,j,k+1)-z_tq(i,j,k) + one_half*dzl(i,j,k+1) ) ) + + if ( quad_bm > zero ) then + if ( quad_c <= zero) then + ! SVL extrapolated from K to K+1 is greater than + ! the level K+1 value - inversion needs to rise + dz_disc = dz_disc_min + else if ( quad_bm*quad_bm >= 4.0_r_bl*quad_a*quad_c ) then + ! solve equation for DZ_DISC... + if ( abs(quad_a) >= rbl_eps ) then + ! ...quadratic if QUAD_A ne 0 + dz_disc = ( quad_bm - sqrt( quad_bm*quad_bm & + - 4.0_r_bl*quad_a*quad_c ) & + ) / (2.0_r_bl*quad_a) + else + ! ...linear if QUAD_A = 0 + dz_disc = quad_c / quad_bm + end if + else + dz_disc = 99999.9_r_bl ! large dummy value + end if + + if ( dz_disc > 0.9_r_bl * dzl(i,j,k+1) ) then + if ( ntdsc(i,j) == 2 ) then + dz_disc = dzl(i,j,k+1) + else + ! ZHSC diagnosed very close to or below Z_UV(K+1): + if ( svl(i,j,k)-svl(i,j,k-1) > zero) then + ! top of ML stably stratified so lower NTDSC but + ! set ZHSC only fractionally (DZ_DISC_MIN) + ! below the top of the inversion level. + ntdsc(i,j) = ntdsc(i,j) - 1 + k=ntdsc(i,j) + dz_disc = dz_disc_min + dscdepth(i,j) = dscdepth(i,j) - dzl(i,j,k+1) + ! Note that all but DZ_DISC_MIN of this layer will + ! be added back on to DSCDEPTH a few lines below + else + ! top of ML well-mixed so don't lower the inversion + ! level but set ZHSC just (DZ_DISC_MIN) above the + ! half-level to allow the inversion to subside if + ! necessary. + dz_disc = dzl(i,j,k+1) - dz_disc_min + end if + end if + end if + + else ! QUAD_BM le 0 + !.. ignoring lapse rates + dsvl_top = svl(i,j,k+2) - svl(i,j,k) + dz_disc = dzl(i,j,k+1) * & + (svl(i,j,k+1)-svl(i,j,k)) / dsvl_top + end if + + zhsc(i,j) = z_uv(i,j,k+2) - dz_disc + + if ( sc_diag_opt == sc_diag_cu_rh_max .or. & + sc_diag_opt == sc_diag_all_rh_max ) then + ! The initial zhsc can be between model-levels rather than exactly + ! on a rho-level. Assuming height of base of DSC layer stays the + ! same, set new depth based on updated DSC top height: + dscdepth(i,j) = zhsc(i,j) - z_cbase + else + ! The initial zhsc is always at rho-level ntdsc+1; + ! increment the DSC depth consistent with this: + dscdepth(i,j) = dscdepth(i,j) + zhsc(i,j) - z_uv(i,j,k+1) + end if + + dsc_disc_inv(i,j) = 1 ! set flag to indicate disc inv found + + !----------------------------------------------------------- + !..Calculate DSC inversion discontinuous jumps of SL and QW + !----------------------------------------------------------- + ! Allow for lapse rate above inversion, if known + dz_disc = z_tq(i,j,k+2) - zhsc(i,j) + sl_lapse = zero + qw_lapse = zero + if ( k <= bl_levels-3 ) then + sl_lapse = max( zero, & + ( sl(i,j,k+3) - sl(i,j,k+2) )*rdz(i,j,k+3) ) + qw_lapse = min( zero, & + ( qw(i,j,k+3) - qw(i,j,k+2) )*rdz(i,j,k+3) ) + + if (l_wtrac) then ! Store method + if (qw_lapse >= 0.0) then + qw_lapse_zero_dsc(i,j) = .true. + end if + end if + + end if + + !----------------- + ! First SL jump + !----------------- + ! Only reduce 2 level jump by at most half + dsl_dsc(i,j) = sl(i,j,k+2) - sl(i,j,k) + dsl_dsc(i,j) = dsl_dsc(i,j) - & + min( one_half*dsl_dsc(i,j), sl_lapse*dz_disc ) + !----------------- + ! Next QW jump + !----------------- + if ( qw(i,j,k+2) < qw(i,j,k+1) .and. & + qw(i,j,k+1) < qw(i,j,k) ) then + ! QW monotonically decreasing across inversion + ! Only allow for QW lapse rate if both it and the + ! 2 grid-level jump are negative (expected sign) + dqw_dsc(i,j) = qw(i,j,k+2) - qw(i,j,k) + if (l_wtrac) dqw_dsc_meth(i,j) = 1 + + if ( dqw_dsc(i,j) < zero ) then + if (l_wtrac) then ! Store method + if ( one_half*dqw_dsc(i,j) > qw_lapse*dz_disc ) then + dqw_dsc_meth(i,j) = 2 + else + dqw_dsc_meth(i,j) = 3 + end if + end if + dqw_dsc(i,j) = dqw_dsc(i,j) - & + max( one_half*dqw_dsc(i,j), qw_lapse*dz_disc ) + end if + else if ( qw(i,j,k+2) > qw(i,j,k+1) .and. & + qw(i,j,k+1) > qw(i,j,k) ) then + ! QW monotonically increasing across inversion + ! Suggests something unusual is going so not clear how + ! to proceed, so currently leaving DQW as 2 level jump + dqw_dsc(i,j) = qw(i,j,k+2) - qw(i,j,k) + if (l_wtrac) dqw_dsc_meth(i,j) = 1 + end if + + end if ! monotonic inversion + end if ! test on K lt BL_LEVELS-2 + end if ! test on DSC + end do !i +end do !ii !$OMP end do !end do @@ -3157,6 +3170,7 @@ subroutine kmkhz_9c ( & end do !$OMP end do NOWAIT +! No wait removal due to dimension change? !end do @@ -3216,156 +3230,62 @@ subroutine kmkhz_9c ( & !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) -do i = pdims%i_start, pdims%i_end - !-------------------------- - ! First the SML - !-------------------------- - qcl_ic_top(i,j) = zero - qcf_ic_top(i,j) = zero - cfl_ml = zero - cff_ml = zero - - km = ntml(i,j) - if ( sml_disc_inv(i,j) == 1 ) then - !----------------------------------------------------- - ! Extrapolate water contents from level with max CF, - ! out of NTML and NTML-1 (ie near top of SML), - ! to the top of the mixed layer - !----------------------------------------------------- - if (cf_sml(i,j) > zero) then - kmax = km - if (cf(i,j,km-1) > cf(i,j,km)) kmax = km-1 - if ( l_check_ntp1 .and. cf(i,j,km+1) > cf(i,j,kmax) ) kmax = km+1 - - cfl_ml = cf_sml(i,j)*cfl(i,j,kmax) & - /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) - cff_ml = cf_sml(i,j)*cff(i,j,kmax) & - /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) - - if (cfl_ml > 0.01_r_bl) qcl_ic_top(i,j) = qcl(i,j,kmax)/cfl_ml & - + ( zh(i,j)-z_tq(i,j,km) )*dqcldz(i,j,km) - if (cff_ml > 0.01_r_bl) qcf_ic_top(i,j) = qcf(i,j,kmax)/cff_ml & - + ( zh(i,j)-z_tq(i,j,km) )*dqcfdz(i,j,km) - end if - - dqw = dqw_sml(i,j) - dsl = dsl_sml(i,j) - ! ignore any cloud above the inversion - dqcl = - cfl_ml*qcl_ic_top(i,j) - dqcf = - cff_ml*qcf_ic_top(i,j) - - db_disc = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & - (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & - (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) - - if ( db_disc > 0.03_r_bl ) then - ! Diagnosed inversion statically stable and at least ~1K - db_top(i,j) = db_disc - else - ! Diagnosed inversion statically UNstable - ! Reset flag to use entrainment K (rather than fluxes) - sml_disc_inv(i,j) = 0 - zh(i,j) = z_uv(i,j,ntml(i,j)+1) - end if - end if ! disc inversion diagnosed - - if ( sml_disc_inv(i,j) == 0 ) then - ! Calculate using simple grid-level differences - kp = km+1 - dqw = qw(i,j,kp) - qw(i,j,km) - dsl = sl(i,j,kp) - sl(i,j,km) - qcl_ic_top(i,j) = qcl(i,j,km) - qcf_ic_top(i,j) = qcf(i,j,km) - dqcl = qcl(i,j,kp) - qcl_ic_top(i,j) - dqcf = qcf(i,j,kp) - qcf_ic_top(i,j) - db_top(i,j) = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & - (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & - (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) - end if ! no disc inversion diagnosed - - db_top_cld(i,j) = g * ( btm_cld(i,j,km)*dsl & - + bqm_cld(i,j,km)*dqw ) - denom = a_qsm(i,j,km)*dqw - a_dqsdtm(i,j,km)*dsl - if (abs(denom) > rbl_eps) then - chi_s_top(i,j) = -qcl_ic_top(i,j) / denom - chi_s_top(i,j) = max( zero, min( chi_s_top(i,j), one) ) - end if - - if ( db_top(i,j) < 0.003_r_bl ) then - ! Diagnosed inversion statically unstable: - ! ensure DB>0 so that entrainment is non-zero and - ! instability can be removed. - db_top(i,j) = 0.003_r_bl - db_top_cld(i,j) = zero ! set buoyancy reversal - chi_s_top(i,j) = zero ! term to zero - end if - -end do -!$OMP end do -!end do - - - !-------------------------- - ! Then the DSC layer - !-------------------------- - - -!do j = pdims%j_start, pdims%j_end -!$OMP do SCHEDULE(DYNAMIC) -do i = pdims%i_start, pdims%i_end - if ( dsc(i,j) ) then - +do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + !-------------------------- + ! First the SML + !-------------------------- qcl_ic_top(i,j) = zero qcf_ic_top(i,j) = zero cfl_ml = zero cff_ml = zero - km = ntdsc(i,j) - if ( dsc_disc_inv(i,j) == 1 ) then + km = ntml(i,j) + if ( sml_disc_inv(i,j) == 1 ) then !----------------------------------------------------- ! Extrapolate water contents from level with max CF, - ! out of NTDSC and NTDSC-1 (ie near top of DSC), + ! out of NTML and NTML-1 (ie near top of SML), ! to the top of the mixed layer !----------------------------------------------------- - if (cf_dsc(i,j) > zero) then + if (cf_sml(i,j) > zero) then kmax = km if (cf(i,j,km-1) > cf(i,j,km)) kmax = km-1 if ( l_check_ntp1 .and. cf(i,j,km+1) > cf(i,j,kmax) ) kmax = km+1 - cfl_ml = cf_dsc(i,j)*cfl(i,j,kmax) & - /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) - cff_ml = cf_dsc(i,j)*cff(i,j,kmax) & - /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) - if (cfl_ml > 0.01_r_bl) qcl_ic_top(i,j) = qcl(i,j,kmax)/cfl_ml & - + ( zhsc(i,j)-z_tq(i,j,km) )*dqcldz(i,j,km) - if (cff_ml > 0.01_r_bl) qcf_ic_top(i,j) = qcf(i,j,kmax)/cff_ml & - + ( zhsc(i,j)-z_tq(i,j,km) )*dqcfdz(i,j,km) + cfl_ml = cf_sml(i,j)*cfl(i,j,kmax) & + /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) + cff_ml = cf_sml(i,j)*cff(i,j,kmax) & + /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) + if (cfl_ml > 0.01_r_bl) qcl_ic_top(i,j) = qcl(i,j,kmax)/cfl_ml & + + ( zh(i,j)-z_tq(i,j,km) )*dqcldz(i,j,km) + if (cff_ml > 0.01_r_bl) qcf_ic_top(i,j) = qcf(i,j,kmax)/cff_ml & + + ( zh(i,j)-z_tq(i,j,km) )*dqcfdz(i,j,km) end if - dqw = dqw_dsc(i,j) - dsl = dsl_dsc(i,j) + dqw = dqw_sml(i,j) + dsl = dsl_sml(i,j) ! ignore any cloud above the inversion dqcl = - cfl_ml*qcl_ic_top(i,j) dqcf = - cff_ml*qcf_ic_top(i,j) - db_disc = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & - (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & - (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) + db_disc = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & + (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & + (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) if ( db_disc > 0.03_r_bl ) then - ! Diagnosed inversion statically stable - db_dsct(i,j) = db_disc + ! Diagnosed inversion statically stable and at least ~1K + db_top(i,j) = db_disc else ! Diagnosed inversion statically UNstable ! Reset flag to use entrainment K (rather than fluxes) - dsc_disc_inv(i,j) = 0 - zhsc(i,j) = z_uv(i,j,ntdsc(i,j)+1) + sml_disc_inv(i,j) = 0 + zh(i,j) = z_uv(i,j,ntml(i,j)+1) end if end if ! disc inversion diagnosed - if ( dsc_disc_inv(i,j) == 0 ) then - ! Calculate using simple grid-level differences + if ( sml_disc_inv(i,j) == 0 ) then + ! Calculate using simple grid-level differences kp = km+1 dqw = qw(i,j,kp) - qw(i,j,km) dsl = sl(i,j,kp) - sl(i,j,km) @@ -3373,54 +3293,153 @@ subroutine kmkhz_9c ( & qcf_ic_top(i,j) = qcf(i,j,km) dqcl = qcl(i,j,kp) - qcl_ic_top(i,j) dqcf = qcf(i,j,kp) - qcf_ic_top(i,j) - db_dsct(i,j) = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & - (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & + db_top(i,j) = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & + (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) end if ! no disc inversion diagnosed - db_dsct_cld(i,j) = g * ( btm_cld(i,j,km)*dsl & - + bqm_cld(i,j,km)*dqw ) + db_top_cld(i,j) = g * ( btm_cld(i,j,km)*dsl & + + bqm_cld(i,j,km)*dqw ) denom = a_qsm(i,j,km)*dqw - a_dqsdtm(i,j,km)*dsl if (abs(denom) > rbl_eps) then - chi_s_dsct(i,j) = -qcl_ic_top(i,j) / denom - chi_s_dsct(i,j) = max( zero, min( chi_s_dsct(i,j), one) ) + chi_s_top(i,j) = -qcl_ic_top(i,j) / denom + chi_s_top(i,j) = max( zero, min( chi_s_top(i,j), one) ) end if - if ( db_dsct(i,j) < 0.003_r_bl ) then + if ( db_top(i,j) < 0.003_r_bl ) then ! Diagnosed inversion statically unstable: ! ensure DB>0 so that entrainment is non-zero and ! instability can be removed. - db_dsct(i,j) = 0.003_r_bl - db_dsct_cld(i,j) = zero ! set buoyancy reversal - chi_s_dsct(i,j) = zero ! term to zero + db_top(i,j) = 0.003_r_bl + db_top_cld(i,j) = zero ! set buoyancy reversal + chi_s_top(i,j) = zero ! term to zero end if - end if ! test on DSC - - !----------------------------------------------------------------------- - ! 7.3 Calculation of other SML and DSC inputs to entr param. - ! If COUPLED then SML are not used as no "entrainment" is then - ! applied at ZH. - !----------------------------------------------------------------------- - - !------------------------------------------------------ - ! Calculation of SML inputs. - !------------------------------------------------------ - k = ntml(i,j) - kp2=min(k+1+sml_disc_inv(i,j),bl_levels) - cld_factor(i,j) = max( zero , cf_sml(i,j)-cf(i,j,kp2) ) - bt_top(i,j) = g * btm(i,j,k) - btt_top(i,j) = g * btm_cld(i,j,k) - btc_top(i,j) = btt_top(i,j) - !--------------------------------------------------- - ! Calculation of DSC inputs - !--------------------------------------------------- - if (dsc(i,j)) then - k = ntdsc(i,j) - kp2=min(k+1+dsc_disc_inv(i,j),bl_levels) - cld_factor_dsc(i,j) = max( zero , cf_dsc(i,j)-cf(i,j,kp2) ) - bt_dsct(i,j) = g * btm(i,j,k) - btt_dsct(i,j) = g * btm_cld(i,j,k) - end if + + end do !i +end do !ii +!$OMP end do +!end do + + + !-------------------------- + ! Then the DSC layer + !-------------------------- + + +!do j = pdims%j_start, pdims%j_end +!$OMP do SCHEDULE(DYNAMIC) +do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + ! do i = pdims%i_start, pdims%i_end + if ( dsc(i,j) ) then + + qcl_ic_top(i,j) = zero + qcf_ic_top(i,j) = zero + cfl_ml = zero + cff_ml = zero + + km = ntdsc(i,j) + if ( dsc_disc_inv(i,j) == 1 ) then + !----------------------------------------------------- + ! Extrapolate water contents from level with max CF, + ! out of NTDSC and NTDSC-1 (ie near top of DSC), + ! to the top of the mixed layer + !----------------------------------------------------- + if (cf_dsc(i,j) > zero) then + kmax = km + if (cf(i,j,km-1) > cf(i,j,km)) kmax = km-1 + if ( l_check_ntp1 .and. cf(i,j,km+1) > cf(i,j,kmax) ) kmax = km+1 + + cfl_ml = cf_dsc(i,j)*cfl(i,j,kmax) & + /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) + cff_ml = cf_dsc(i,j)*cff(i,j,kmax) & + /(cfl(i,j,kmax)+cff(i,j,kmax)+rbl_eps) + if (cfl_ml > 0.01_r_bl) qcl_ic_top(i,j) = qcl(i,j,kmax)/cfl_ml & + + ( zhsc(i,j)-z_tq(i,j,km) )*dqcldz(i,j,km) + if (cff_ml > 0.01_r_bl) qcf_ic_top(i,j) = qcf(i,j,kmax)/cff_ml & + + ( zhsc(i,j)-z_tq(i,j,km) )*dqcfdz(i,j,km) + + end if + + dqw = dqw_dsc(i,j) + dsl = dsl_dsc(i,j) + ! ignore any cloud above the inversion + dqcl = - cfl_ml*qcl_ic_top(i,j) + dqcf = - cff_ml*qcf_ic_top(i,j) + + db_disc = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & + (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & + (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) + + if ( db_disc > 0.03_r_bl ) then + ! Diagnosed inversion statically stable + db_dsct(i,j) = db_disc + else + ! Diagnosed inversion statically UNstable + ! Reset flag to use entrainment K (rather than fluxes) + dsc_disc_inv(i,j) = 0 + zhsc(i,j) = z_uv(i,j,ntdsc(i,j)+1) + end if + end if ! disc inversion diagnosed + + if ( dsc_disc_inv(i,j) == 0 ) then + ! Calculate using simple grid-level differences + kp = km+1 + dqw = qw(i,j,kp) - qw(i,j,km) + dsl = sl(i,j,kp) - sl(i,j,km) + qcl_ic_top(i,j) = qcl(i,j,km) + qcf_ic_top(i,j) = qcf(i,j,km) + dqcl = qcl(i,j,kp) - qcl_ic_top(i,j) + dqcf = qcf(i,j,kp) - qcf_ic_top(i,j) + db_dsct(i,j) = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & + (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & + (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) + end if ! no disc inversion diagnosed + + db_dsct_cld(i,j) = g * ( btm_cld(i,j,km)*dsl & + + bqm_cld(i,j,km)*dqw ) + denom = a_qsm(i,j,km)*dqw - a_dqsdtm(i,j,km)*dsl + if (abs(denom) > rbl_eps) then + chi_s_dsct(i,j) = -qcl_ic_top(i,j) / denom + chi_s_dsct(i,j) = max( zero, min( chi_s_dsct(i,j), one) ) + end if + + if ( db_dsct(i,j) < 0.003_r_bl ) then + ! Diagnosed inversion statically unstable: + ! ensure DB>0 so that entrainment is non-zero and + ! instability can be removed. + db_dsct(i,j) = 0.003_r_bl + db_dsct_cld(i,j) = zero ! set buoyancy reversal + chi_s_dsct(i,j) = zero ! term to zero + end if + end if ! test on DSC + + !----------------------------------------------------------------------- + ! 7.3 Calculation of other SML and DSC inputs to entr param. + ! If COUPLED then SML are not used as no "entrainment" is then + ! applied at ZH. + !----------------------------------------------------------------------- + + !------------------------------------------------------ + ! Calculation of SML inputs. + !------------------------------------------------------ + k = ntml(i,j) + kp2=min(k+1+sml_disc_inv(i,j),bl_levels) + cld_factor(i,j) = max( zero , cf_sml(i,j)-cf(i,j,kp2) ) + bt_top(i,j) = g * btm(i,j,k) + btt_top(i,j) = g * btm_cld(i,j,k) + btc_top(i,j) = btt_top(i,j) + !--------------------------------------------------- + ! Calculation of DSC inputs + !--------------------------------------------------- + if (dsc(i,j)) then + k = ntdsc(i,j) + kp2=min(k+1+dsc_disc_inv(i,j),bl_levels) + cld_factor_dsc(i,j) = max( zero , cf_dsc(i,j)-cf(i,j,kp2) ) + bt_dsct(i,j) = g * btm(i,j,k) + btt_dsct(i,j) = g * btm_cld(i,j,k) + end if + end do end do !$OMP end do !end do @@ -3433,88 +3452,90 @@ subroutine kmkhz_9c ( & !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) -do i = pdims%i_start, pdims%i_end - z_cld(i,j) = min( z_cld(i,j), zh(i,j) ) - z_cld_dsc(i,j) = min( z_cld_dsc(i,j), zhsc(i,j) ) - !--------------------------------------------------------------- - ! First the surface mixed layer. - !--------------------------------------------------------------- - if ( coupled(i,j) ) then - zeta_s(i,j) = one - z_cld_dsc(i,j) / zhsc(i,j) - zeta_r(i,j) = one - zc_dsc(i,j) / zhsc(i,j) - else - zeta_s(i,j) = one - z_cld(i,j) / zh(i,j) - zeta_r(i,j) = one - zc(i,j) / zh(i,j) - end if - - if (db_top_cld(i,j) >= zero) then - !-------------------------------------------------- - ! i.e. no buoyancy reversal (or default if COUPLED) - !-------------------------------------------------- - db_top_cld(i,j) = zero - d_siems(i,j) = zero - br_fback(i,j)= zero - else - !---------------------------- - ! if (DB_TOP_CLD(I,j) < 0.0) - ! i.e. buoyancy reversal - !---------------------------- - db_top_cld(i,j) = -db_top_cld(i,j) * cld_factor(i,j) - d_siems(i,j) = max( zero, & - chi_s_top(i,j) * db_top_cld(i,j) / (db_top(i,j)+rbl_eps) ) - ! Linear feedback dependence for D<0.1 - br_fback(i,j)= min( one, 10.0_r_bl*d_siems(i,j) ) - zeta_r(i,j) = zeta_r(i,j) + (one-zeta_r(i,j))*br_fback(i,j) - end if - !--------------------------------------------------------------- - ! Now the decoupled Sc layer (DSC). - !--------------------------------------------------------------- - if (dsc(i,j)) then +do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + z_cld(i,j) = min( z_cld(i,j), zh(i,j) ) + z_cld_dsc(i,j) = min( z_cld_dsc(i,j), zhsc(i,j) ) + !--------------------------------------------------------------- + ! First the surface mixed layer. + !--------------------------------------------------------------- if ( coupled(i,j) ) then - zeta_r_dsc(i,j) = one - zc_dsc(i,j) / zhsc(i,j) + zeta_s(i,j) = one - z_cld_dsc(i,j) / zhsc(i,j) + zeta_r(i,j) = one - zc_dsc(i,j) / zhsc(i,j) else - zeta_r_dsc(i,j) = one - zc_dsc(i,j) / dscdepth(i,j) + zeta_s(i,j) = one - z_cld(i,j) / zh(i,j) + zeta_r(i,j) = one - zc(i,j) / zh(i,j) end if - if (db_dsct_cld(i,j) >= zero) then - !---------------------------- - ! i.e. no buoyancy reversal - !---------------------------- - db_dsct_cld(i,j) = zero - d_siems_dsc(i,j) = zero - br_fback_dsc(i,j)= zero + if (db_top_cld(i,j) >= zero) then + !-------------------------------------------------- + ! i.e. no buoyancy reversal (or default if COUPLED) + !-------------------------------------------------- + db_top_cld(i,j) = zero + d_siems(i,j) = zero + br_fback(i,j)= zero else !---------------------------- - ! if (DB_DSCT_CLD(I,j) < 0.0) + ! if (DB_TOP_CLD(I,j) < 0.0) ! i.e. buoyancy reversal !---------------------------- - db_dsct_cld(i,j) = -db_dsct_cld(i,j) * cld_factor_dsc(i,j) - d_siems_dsc(i,j) = max( zero, chi_s_dsct(i,j) & - * db_dsct_cld(i,j) / (db_dsct(i,j)+rbl_eps) ) + db_top_cld(i,j) = -db_top_cld(i,j) * cld_factor(i,j) + d_siems(i,j) = max( zero, & + chi_s_top(i,j) * db_top_cld(i,j) / (db_top(i,j)+rbl_eps) ) ! Linear feedback dependence for D<0.1 - br_fback_dsc(i,j) = min( one, 10.0_r_bl*d_siems_dsc(i,j) ) - - if ( entr_enhance_by_cu == Buoyrev_feedback & - .and. cumulus(i,j) & - .and. d_siems_dsc(i,j) < 0.1_r_bl & - .and. d_siems_dsc(i,j) > rbl_eps ) then - ! Assume mixing from cumulus can enhance the - ! buoyancy reversal feedback in regime 00 below 400m, 1 above 1000m - cu_depth_fac = one_half*( one+ & - tanh( ((zhpar(i,j)-zh(i,j))-700.0_r_bl)/100.0_r_bl) ) - ! BR_FBACK = unchanged for Cu<400m, ->1 for Cu>1000. - br_fback_dsc(i,j) = cu_depth_fac + & - (one-cu_depth_fac)*br_fback_dsc(i,j) + br_fback(i,j)= min( one, 10.0_r_bl*d_siems(i,j) ) + zeta_r(i,j) = zeta_r(i,j) + (one-zeta_r(i,j))*br_fback(i,j) + end if + !--------------------------------------------------------------- + ! Now the decoupled Sc layer (DSC). + !--------------------------------------------------------------- + if (dsc(i,j)) then + if ( coupled(i,j) ) then + zeta_r_dsc(i,j) = one - zc_dsc(i,j) / zhsc(i,j) + else + zeta_r_dsc(i,j) = one - zc_dsc(i,j) / dscdepth(i,j) end if - zeta_r_dsc(i,j) = zeta_r_dsc(i,j) + & - (one-zeta_r_dsc(i,j))*br_fback_dsc(i,j) + if (db_dsct_cld(i,j) >= zero) then + !---------------------------- + ! i.e. no buoyancy reversal + !---------------------------- + db_dsct_cld(i,j) = zero + d_siems_dsc(i,j) = zero + br_fback_dsc(i,j)= zero + else + !---------------------------- + ! if (DB_DSCT_CLD(I,j) < 0.0) + ! i.e. buoyancy reversal + !---------------------------- + db_dsct_cld(i,j) = -db_dsct_cld(i,j) * cld_factor_dsc(i,j) + d_siems_dsc(i,j) = max( zero, chi_s_dsct(i,j) & + * db_dsct_cld(i,j) / (db_dsct(i,j)+rbl_eps) ) + ! Linear feedback dependence for D<0.1 + br_fback_dsc(i,j) = min( one, 10.0_r_bl*d_siems_dsc(i,j) ) + + if ( entr_enhance_by_cu == Buoyrev_feedback & + .and. cumulus(i,j) & + .and. d_siems_dsc(i,j) < 0.1_r_bl & + .and. d_siems_dsc(i,j) > rbl_eps ) then + ! Assume mixing from cumulus can enhance the + ! buoyancy reversal feedback in regime 00 below 400m, 1 above 1000m + cu_depth_fac = one_half*( one+ & + tanh( ((zhpar(i,j)-zh(i,j))-700.0_r_bl)/100.0_r_bl) ) + ! BR_FBACK = unchanged for Cu<400m, ->1 for Cu>1000. + br_fback_dsc(i,j) = cu_depth_fac + & + (one-cu_depth_fac)*br_fback_dsc(i,j) + end if + + zeta_r_dsc(i,j) = zeta_r_dsc(i,j) + & + (one-zeta_r_dsc(i,j))*br_fback_dsc(i,j) + end if end if - end if -end do + end do !i +end do !ii !$OMP end do ! end do @@ -3554,32 +3575,34 @@ subroutine kmkhz_9c ( & ! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) - do i = pdims%i_start, pdims%i_end - k_rad_lim = ntml(i,j)+1 - z_rad_lim = max( z_tq(i,j,k_rad_lim)+0.1_r_bl, 1.2_r_bl*zh(i,j) ) - k = 1 - do while (z_tq(i,j,k) < z_rad_lim .and. k < bl_levels) - if (dflw_over_cp(i,j,k) > df_top_over_cp(i,j) & - .and. z_tq(i,j,k) > one_half*zh(i,j) ) then - k_cloud_top(i,j) = k - df_top_over_cp(i,j) = dflw_over_cp(i,j,k) + do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + k_rad_lim = ntml(i,j)+1 + z_rad_lim = max( z_tq(i,j,k_rad_lim)+0.1_r_bl, 1.2_r_bl*zh(i,j) ) + k = 1 + do while (z_tq(i,j,k) < z_rad_lim .and. k < bl_levels) + if (dflw_over_cp(i,j,k) > df_top_over_cp(i,j) & + .and. z_tq(i,j,k) > one_half*zh(i,j) ) then + k_cloud_top(i,j) = k + df_top_over_cp(i,j) = dflw_over_cp(i,j,k) + end if + k = k + 1 + end do ! k + !----------------------------------------------------------------- + ! If DF(K_CLOUD_TOP+1) is less than double DF(K_CLOUD_TOP+2) we + ! assume DF(K_CLOUD_TOP+1) is actually typical of the free-trop and + ! that the current K_CLOUD_TOP must be the inversion grid-level. + ! Hence we lower K_CLOUD_TOP by one (it should mark the top of the + ! mixed layer and cloud-top radiative cooling within the invesion + ! grid-level will be included as DF_INV_SML below) + !----------------------------------------------------------------- + k = k_cloud_top(i,j) + if ( k > 1 .and. k < bl_levels -1 ) then + if (dflw_over_cp(i,j,k+1) < 1.5_r_bl*dflw_over_cp(i,j,k+2)) & + k_cloud_top(i,j) = k-1 end if - k = k + 1 - end do ! k - !----------------------------------------------------------------- - ! If DF(K_CLOUD_TOP+1) is less than double DF(K_CLOUD_TOP+2) we - ! assume DF(K_CLOUD_TOP+1) is actually typical of the free-trop and - ! that the current K_CLOUD_TOP must be the inversion grid-level. - ! Hence we lower K_CLOUD_TOP by one (it should mark the top of the - ! mixed layer and cloud-top radiative cooling within the invesion - ! grid-level will be included as DF_INV_SML below) - !----------------------------------------------------------------- - k = k_cloud_top(i,j) - if ( k > 1 .and. k < bl_levels -1 ) then - if (dflw_over_cp(i,j,k+1) < 1.5_r_bl*dflw_over_cp(i,j,k+2)) & - k_cloud_top(i,j) = k-1 - end if - end do ! i + end do ! i + end do ! ii !$OMP end do !----------------------------------------------------------------- ! Find bottom grid-level (K_LEVEL) for cloud-top radiative fux @@ -3587,22 +3610,24 @@ subroutine kmkhz_9c ( & ! 0.5*ZH, since cooling must be in upper part of layer !----------------------------------------------------------------- !$OMP do SCHEDULE(DYNAMIC) - do i = pdims%i_start, pdims%i_end - k_level(i,j) = k_cloud_top(i,j) - if ( k_cloud_top(i,j) > 1 ) then - k_rad_lim = 1 - k=k_cloud_top(i,j)-1 - kl=max(1,k) ! only to avoid out-of-bounds compiler warning - do while ( k > k_rad_lim & - .and. dflw_over_cp(i,j,kl) > zero & - .and. z_tq(i,j,kl) > one_half*zh(i,j) ) - k_level(i,j) = k - k = k-1 - kl=max(1,k) - - end do ! k - end if - end do ! i + do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + k_level(i,j) = k_cloud_top(i,j) + if ( k_cloud_top(i,j) > 1 ) then + k_rad_lim = 1 + k=k_cloud_top(i,j)-1 + kl=max(1,k) ! only to avoid out-of-bounds compiler warning + do while ( k > k_rad_lim & + .and. dflw_over_cp(i,j,kl) > zero & + .and. z_tq(i,j,kl) > one_half*zh(i,j) ) + k_level(i,j) = k + k = k-1 + kl=max(1,k) + + end do ! k + end if + end do ! i + end do ! ii !$OMP end do !end do ! j @@ -3615,30 +3640,32 @@ subroutine kmkhz_9c ( & !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) - do i = pdims%i_start, pdims%i_end - ! restrict search to `close' to ZH - k_rad_lim = ntml(i,j)+1 - do k = 1, min(bl_levels,k_rad_lim) - !------------------------------------------------------------- - ! Find the layer below K_RAD_LIM with the greatest LW - ! radiative flux jump in the upper half of the BL - ! and assume that this is the top of the SML. - !------------------------------------------------------------- - if (dflw_over_cp(i,j,k) > df_top_over_cp(i,j) & - .and. z_tq(i,j,k) > one_half*zh(i,j) ) then - k_cloud_top(i,j) = k - if ( k > 1 ) then - ! Set K_CLOUD_TOP to the level below if its DF is - ! greater than half the maximum. DF in level - ! K_CLOUD_TOP+1 is then included as DF_INV_SML below. - if (dflw_over_cp(i,j,k-1) > one_half*dflw_over_cp(i,j,k)) & - k_cloud_top(i,j) = k-1 + do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + ! restrict search to `close' to ZH + k_rad_lim = ntml(i,j)+1 + do k = 1, min(bl_levels,k_rad_lim) + !------------------------------------------------------------- + ! Find the layer below K_RAD_LIM with the greatest LW + ! radiative flux jump in the upper half of the BL + ! and assume that this is the top of the SML. + !------------------------------------------------------------- + if (dflw_over_cp(i,j,k) > df_top_over_cp(i,j) & + .and. z_tq(i,j,k) > one_half*zh(i,j) ) then + k_cloud_top(i,j) = k + if ( k > 1 ) then + ! Set K_CLOUD_TOP to the level below if its DF is + ! greater than half the maximum. DF in level + ! K_CLOUD_TOP+1 is then included as DF_INV_SML below. + if (dflw_over_cp(i,j,k-1) > one_half*dflw_over_cp(i,j,k)) & + k_cloud_top(i,j) = k-1 + end if + df_top_over_cp(i,j) = dflw_over_cp(i,j,k) end if - df_top_over_cp(i,j) = dflw_over_cp(i,j,k) - end if - end do ! k - end do ! i + end do ! k + end do ! i + end do ! ii !$OMP end do !----------------------------------------------------------------- @@ -3647,22 +3674,24 @@ subroutine kmkhz_9c ( & ! 0.5*ZH, since cooling must be in upper part of layer !----------------------------------------------------------------- !$OMP do SCHEDULE(DYNAMIC) - do i = pdims%i_start, pdims%i_end - k_level(i,j) = k_cloud_top(i,j) - if ( k_cloud_top(i,j) > 1 ) then - k_rad_lim = 1 - k=k_cloud_top(i,j)-1 - kl=max(1,k) ! only to avoid out-of-bounds compiler warning - do while ( k > k_rad_lim & - .and. dflw_over_cp(i,j,kl) > zero & - .and. z_tq(i,j,kl) > one_half*zh(i,j) ) - k_level(i,j) = k - k = k-1 - kl=max(1,k) + do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) + k_level(i,j) = k_cloud_top(i,j) + if ( k_cloud_top(i,j) > 1 ) then + k_rad_lim = 1 + k=k_cloud_top(i,j)-1 + kl=max(1,k) ! only to avoid out-of-bounds compiler warning + do while ( k > k_rad_lim & + .and. dflw_over_cp(i,j,kl) > zero & + .and. z_tq(i,j,kl) > one_half*zh(i,j) ) + k_level(i,j) = k + k = k-1 + kl=max(1,k) - end do - end if - end do ! i + end do + end if + end do ! i + end do ! ii !$OMP end do !end do ! j @@ -3681,48 +3710,51 @@ subroutine kmkhz_9c ( & !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) -do i = pdims%i_start, pdims%i_end - - if ( k_cloud_top(i,j) > 0 ) then - dflw_inv = zero - dfsw_inv = zero - if ( k_cloud_top(i,j) < bl_levels ) then - k = k_cloud_top(i,j)+1 - if ( k < bl_levels ) then - dflw_inv = dflw_over_cp(i,j,k) & - - dflw_over_cp(i,j,k+1) & - * dzl(i,j,k)/dzl(i,j,k+1) - dfsw_inv = dfsw_over_cp(i,j,k) & - - dfsw_over_cp(i,j,k+1) & - * dzl(i,j,k)/dzl(i,j,k+1) - else - dflw_inv = dflw_over_cp(i,j,k) - dfsw_inv = dfsw_over_cp(i,j,k) +do ii = pdims%i_start, pdims%i_end, bl_segment_size + do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) +! do i = pdims%i_start, pdims%i_end + + if ( k_cloud_top(i,j) > 0 ) then + dflw_inv = zero + dfsw_inv = zero + if ( k_cloud_top(i,j) < bl_levels ) then + k = k_cloud_top(i,j)+1 + if ( k < bl_levels ) then + dflw_inv = dflw_over_cp(i,j,k) & + - dflw_over_cp(i,j,k+1) & + * dzl(i,j,k)/dzl(i,j,k+1) + dfsw_inv = dfsw_over_cp(i,j,k) & + - dfsw_over_cp(i,j,k+1) & + * dzl(i,j,k)/dzl(i,j,k+1) + else + dflw_inv = dflw_over_cp(i,j,k) + dfsw_inv = dfsw_over_cp(i,j,k) + end if + dflw_inv = max( dflw_inv, zero ) + dfsw_inv = min( dfsw_inv, zero ) end if - dflw_inv = max( dflw_inv, zero ) - dfsw_inv = min( dfsw_inv, zero ) - end if - df_inv_sml(i,j) = dflw_inv + dfsw_inv + df_inv_sml(i,j) = dflw_inv + dfsw_inv - df_top_over_cp(i,j) = frad_lw(i,j,k_cloud_top(i,j)+1) & - - frad_lw(i,j,k_level(i,j)) & - + dflw_inv + df_top_over_cp(i,j) = frad_lw(i,j,k_cloud_top(i,j)+1) & + - frad_lw(i,j,k_level(i,j)) & + + dflw_inv - dfsw_top = frad_sw(i,j,k_cloud_top(i,j)+1) & - - frad_sw(i,j,k_level(i,j)) & - + dfsw_inv + dfsw_top = frad_sw(i,j,k_cloud_top(i,j)+1) & + - frad_sw(i,j,k_level(i,j)) & + + dfsw_inv - !----------------------------------------------------------- - ! Combine SW and LW cloud-top divergences into a net - ! divergence by estimating SW flux divergence at a given - ! LW divergence = DF_SW * (1-exp{-A*kappa_sw/kappa_lw}) - ! Empirically (from LEM data) a reasonable fit is found - ! with A small and (1-exp{-A*kappa_sw/kappa_lw}) = dfsw_frac - !----------------------------------------------------------- - df_top_over_cp(i,j) = max( zero, & - df_top_over_cp(i,j) + dfsw_frac * dfsw_top ) - end if -end do + !----------------------------------------------------------- + ! Combine SW and LW cloud-top divergences into a net + ! divergence by estimating SW flux divergence at a given + ! LW divergence = DF_SW * (1-exp{-A*kappa_sw/kappa_lw}) + ! Empirically (from LEM data) a reasonable fit is found + ! with A small and (1-exp{-A*kappa_sw/kappa_lw}) = dfsw_frac + !----------------------------------------------------------- + df_top_over_cp(i,j) = max( zero, & + df_top_over_cp(i,j) + dfsw_frac * dfsw_top ) + end if + end do !i +end do !ii !$OMP end do !end do From 94ca691794e6ec95a5b8acc87f48ebf7f0c4e5b7 Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Wed, 4 Feb 2026 10:26:25 +0000 Subject: [PATCH 06/14] Remove groups to align with trunk --- rose-stem/site/meto/groups/groups_lfric_atm.cylc | 5 ----- ...p_gal9_noukca_1T-C48_MG_ex1a_cce_full-debug-32bit.txt | 9 --------- ...p_gal9_noukca_4T-C48_MG_ex1a_cce_full-debug-32bit.txt | 9 --------- 3 files changed, 23 deletions(-) delete mode 100644 rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_full-debug-32bit.txt delete mode 100644 rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_full-debug-32bit.txt diff --git a/rose-stem/site/meto/groups/groups_lfric_atm.cylc b/rose-stem/site/meto/groups/groups_lfric_atm.cylc index cc82b7ba7..174b5698f 100644 --- a/rose-stem/site/meto/groups/groups_lfric_atm.cylc +++ b/rose-stem/site/meto/groups/groups_lfric_atm.cylc @@ -222,11 +222,6 @@ "lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit", "lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit", ], - "ex1a_omp_C48_cce_full": [ - "lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_full-debug-32bit", - "lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit", - "lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_full-debug-32bit", - ], "ex1a_omp_C48_cce": [ "lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit", "lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit", diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_full-debug-32bit.txt deleted file mode 100644 index ecdac22fe..000000000 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_full-debug-32bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 48D7FB47 -Inner product checksum theta = 5392A6D6 -Inner product checksum u = 6A97B5F7 -Inner product checksum mr1 = 41CCED78 -Inner product checksum mr2 = 39CD58A2 -Inner product checksum mr3 = 37A6C0C1 -Inner product checksum mr4 = 3970B330 -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_full-debug-32bit.txt deleted file mode 100644 index 4dce97887..000000000 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_full-debug-32bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 48D7FB59 -Inner product checksum theta = 5392A6CA -Inner product checksum u = 6A97B3E6 -Inner product checksum mr1 = 41CCEE63 -Inner product checksum mr2 = 39D05F5C -Inner product checksum mr3 = 37A7FEC3 -Inner product checksum mr4 = 3970D685 -Inner product checksum mr5 = 0 -Inner product checksum mr6 = 0 From dc79e01aa6090833c43378bfa9305d0004533a81 Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Thu, 12 Feb 2026 16:57:50 +0000 Subject: [PATCH 07/14] Caputure changes for now, ignore KGOs for fast for the moment --- rose-stem/site/meto/groups/groups_lfric_atm.cylc | 5 +++++ ..._nwp_gal9_1T-C48_MG_ex1a_cce_full-debug-32bit.txt | 9 +++++++++ ..._nwp_gal9_4T-C48_MG_ex1a_cce_full-debug-32bit.txt | 9 +++++++++ .../source/boundary_layer/kmkhz_9c.F90 | 12 ++++++------ 4 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_full-debug-32bit.txt create mode 100644 rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_full-debug-32bit.txt diff --git a/rose-stem/site/meto/groups/groups_lfric_atm.cylc b/rose-stem/site/meto/groups/groups_lfric_atm.cylc index 174b5698f..d1bd6ed56 100644 --- a/rose-stem/site/meto/groups/groups_lfric_atm.cylc +++ b/rose-stem/site/meto/groups/groups_lfric_atm.cylc @@ -230,6 +230,11 @@ "lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit", "lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit", ], + "ex1a_omp_C48_cce_full": [ + "lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_full-debug-32bit", + "lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit", + "lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_full-debug-32bit", + ], "ex1a_omp_C192_cce": [ "lfric_atm_nwp_gal9_3n_1T-C192_MG_ex1a_cce_fast-debug-32bit", "lfric_atm_nwp_gal9_3n_2T-C192_MG_ex1a_cce_fast-debug-32bit", diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_full-debug-32bit.txt new file mode 100644 index 000000000..7d0bbf9c4 --- /dev/null +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_full-debug-32bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 48D7FD20 +Inner product checksum theta = 5392A6D8 +Inner product checksum u = 6A97B848 +Inner product checksum mr1 = 41CD0DCE +Inner product checksum mr2 = 39CF631F +Inner product checksum mr3 = 37AD770F +Inner product checksum mr4 = 39604773 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_full-debug-32bit.txt new file mode 100644 index 000000000..41334f2a4 --- /dev/null +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_full-debug-32bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 48D7FD32 +Inner product checksum theta = 5392A6F0 +Inner product checksum u = 6A97B6F0 +Inner product checksum mr1 = 41CD0826 +Inner product checksum mr2 = 39C92715 +Inner product checksum mr3 = 37B19C28 +Inner product checksum mr4 = 396070D2 +Inner product checksum mr5 = 0 +Inner product checksum mr6 = 0 diff --git a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 index de50501c1..141abd316 100644 --- a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 +++ b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 @@ -1355,7 +1355,7 @@ subroutine kmkhz_9c ( & !end do !j end do ! k end do ! i_wt -!$OMP end do NOWAIT +!$OMP end do end if ! l_wtrac !----------------------------------------------------------------------- @@ -1406,7 +1406,7 @@ subroutine kmkhz_9c ( & !end do end do end do ! ii -!$OMP end do NOWAIT +!$OMP end do !----------------------------------------------------------------------- ! 2. Look for decoupled cloudy mixed-layer above SML top @@ -1708,7 +1708,7 @@ subroutine kmkhz_9c ( & end if end do ! !$OMP end do NOWAIT - !$OMP end do NOWAIT + !$OMP end do !end do end if ! test on sc_diag_opt @@ -3108,7 +3108,7 @@ subroutine kmkhz_9c ( & end do !end do end do -!$OMP end do NOWAIT +!$OMP end do !----------------------------------------------------------------------- ! 7. Calculate inputs for the top of b.l. entrainment parametrization @@ -3169,7 +3169,7 @@ subroutine kmkhz_9c ( & end if end do -!$OMP end do NOWAIT +!$OMP end do ! No wait removal due to dimension change? !end do @@ -3218,7 +3218,7 @@ subroutine kmkhz_9c ( & end do end do end do ! ii -!$OMP end do NOWAIT +!$OMP end do !----------------------------------------------------------------------- ! 7.3 Calculate the buoyancy jumps across the inversions From c6a4cded4ee4505c5b770cd9006bfa022cfb9e94 Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Fri, 13 Feb 2026 14:36:49 +0000 Subject: [PATCH 08/14] Remove commented out sections and further no waits, comment barriers as shouldn't be needed --- .../source/boundary_layer/kmkhz_9c.F90 | 187 +----------------- 1 file changed, 9 insertions(+), 178 deletions(-) diff --git a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 index 141abd316..27b0d6fa7 100644 --- a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 +++ b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 @@ -1048,31 +1048,25 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(STATIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) - !do i = pdims%i_start, pdims%i_end ntml_prev(i,j) = 1 - !end do end do do k = 1, bl_levels-1 do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) - !do i = pdims%i_start, pdims%i_end z_top(i,j,k) = z_uv(i,j,k+1) !------------------------------------------------------------ !find NTML from previous TS (for accurate gradient adjustment !of profiles - also note that NTML le BL_LEVELS-1) !------------------------------------------------------------ if ( zh_prev(i,j) >= z_uv(i,j,k+1) ) ntml_prev(i,j)=k - !end do end do end do k = bl_levels do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) - !do i = pdims%i_start, pdims%i_end z_top(i,j,k) = z_uv(i,j,k) + dzl(i,j,k) - !end do end do end do ! ii -!$OMP end do NOWAIT +!$OMP end do !----------------------------------------------------------------------- ! 1.2 Calculate SVL: conserved buoyancy-like variable @@ -1080,14 +1074,12 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(STATIC) do k = 1, bl_levels - !do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end sl(i,j,k) = tl(i,j,k) + grcp * z_tq(i,j,k) svl(i,j,k) = sl(i,j,k) * ( one + c_virtual*qw(i,j,k) ) end do - !end do end do -!$OMP end do NOWAIT +!$OMP end do !No halos if (l_noice_in_turb) then @@ -1133,7 +1125,6 @@ subroutine kmkhz_9c ( & do k = 1, bl_levels km = max( 1, k-1 ) kp = min( bl_levels, k+1 ) - !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end ! If the Intel Compiler vs 12 is used, a job fails with segmentation @@ -1152,17 +1143,15 @@ subroutine kmkhz_9c ( & sls_inc(i,j,k) = zero qls_inc(i,j,k) = zero end do ! i - !$OMP end do NOWAIT - !end do ! j + !$OMP end do end do ! k -!$OMP BARRIER +!!$OMP BARRIER !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do k = 2, bl_levels-1 do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) - !do i = pdims%i_start, pdims%i_end if ( etadot(i,j,k) < - tiny(one) .and. & etadot(i,j,k-1)< - tiny(one) ) then @@ -1191,12 +1180,10 @@ subroutine kmkhz_9c ( & end if ! safe to calculate increments end if - !end do end do end do end do !ii !$OMP end do -! do j = pdims%j_start, pdims%j_end ! Repeat for necessary parts of last 2 loops for water tracers if (l_wtrac) then !$OMP do SCHEDULE(STATIC) @@ -1208,14 +1195,12 @@ subroutine kmkhz_9c ( & end do ! k end do ! i_wt !$OMP end do - !end do ! j ! Convert to dynamic !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do k = 2, bl_levels-1 do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) - !do i = pdims%i_start, pdims%i_end if ( etadot(i,j,k) < - tiny(one) .and. & etadot(i,j,k-1)< - tiny(one) ) then @@ -1241,14 +1226,12 @@ subroutine kmkhz_9c ( & end do end if ! safe to calculate increments end if - !end do end do end do !i end do !ii !$OMP end do end if ! l_wtrac -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end ! Non-turbulent fluxes are defined relative to the surface @@ -1274,11 +1257,9 @@ subroutine kmkhz_9c ( & fq_nt(i,j,1) = zero end do -!$OMP end do NOWAIT -!end do +!$OMP end do ! Repeat for necessary parts of last loop for water tracers - ! do j = pdims%j_start, pdims%j_end if (l_wtrac) then !$OMP do SCHEDULE(STATIC) do i_wt = 1, n_wtrac @@ -1303,7 +1284,6 @@ subroutine kmkhz_9c ( & do k = 1, bl_levels kp = k+1 - !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end rho_dz = rho_mix_tq(i,j,k) * dzl(i,j,k) @@ -1328,8 +1308,7 @@ subroutine kmkhz_9c ( & ft_nt(i,j,kp) = frad(i,j,kp) + fmic(i,j,kp,1) + fsubs(i,j,kp,1) fq_nt(i,j,kp) = fmic(i,j,kp,2) + fsubs(i,j,kp,2) end do ! i -!$OMP end do NOWAIT -!end do !j +!$OMP end do end do ! k ! Repeat necessary parts of last loop for water tracer @@ -1337,7 +1316,6 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(STATIC) do i_wt = 1, n_wtrac do k = 1, bl_levels - !do j = pdims%j_start, pdims%j_end kp = k+1 do i = pdims%i_start, pdims%i_end rho_dz = rho_mix_tq(i,j,k) * dzl(i,j,k) @@ -1352,7 +1330,6 @@ subroutine kmkhz_9c ( & wtrac_bl(i_wt)%fq_nt(i,j,kp) = & fmic_wtrac(i,j,kp,i_wt) + fsubs_wtrac(i,j,kp,i_wt) end do ! i - !end do !j end do ! k end do ! i_wt !$OMP end do @@ -1364,10 +1341,8 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do i = ii, min(ii+bl_segment_size-1,pdims%i_end) - !do i = pdims%i_start, pdims%i_end unstable(i,j) = (fb_surf(i,j) > zero) k_plume(i,j) = -1 - !end do end do !------------------------------------------------------------ @@ -1380,7 +1355,6 @@ subroutine kmkhz_9c ( & do k = 1, bl_levels-1 do i = ii, min(ii+bl_segment_size-1,pdims%i_end) - !do i = pdims%i_start, pdims%i_end if ( unstable(i,j) ) then @@ -1396,14 +1370,11 @@ subroutine kmkhz_9c ( & end if end if - !end do end do end do do i = ii, min(ii+bl_segment_size-1,pdims%i_end) - !do i = pdims%i_start, pdims%i_end if (k_plume(i,j) == -1) k_plume(i,j)=1 - !end do end do end do ! ii !$OMP end do @@ -1421,7 +1392,6 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- ! Initialise variables -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end cloud_base(i,j) = .false. @@ -1431,7 +1401,6 @@ subroutine kmkhz_9c ( & ntdsc(i,j) = 0 end do !$OMP end do -!end do if ( .not. sc_diag_opt == sc_diag_all_rh_max ) then @@ -1441,7 +1410,6 @@ subroutine kmkhz_9c ( & do ii = pdims%i_start, pdims%i_end, bl_segment_size do k = 3, bl_levels-1 do i = ii, min(ii+bl_segment_size-1,pdims%i_end) - !do i = pdims%i_start, pdims%i_end !----------------------------------------------------------------- !..Find cloud-base (where cloud here means CF > SC_CFTOL) @@ -1558,8 +1526,7 @@ subroutine kmkhz_9c ( & end if end if end if - !end do ! i - end do ! j + end do ! i end do ! k end do ! ii !$OMP end do @@ -1578,8 +1545,6 @@ subroutine kmkhz_9c ( & ! Options that diagnose the Sc-top using the max total-water RH method... - ! j-loop outermost to allow parallelisation (k-loop is sequential) - !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end ! Initialise max RH in the column to zero @@ -1658,13 +1623,11 @@ subroutine kmkhz_9c ( & end if ! ( ntdsc(i,j) > 0 ) end do !$OMP end do NOWAIT - !end do else if ( sc_diag_opt == sc_diag_cu_relax ) then ! Diagnosed simply if significant cloud fraction at ZHPAR ! below the height threshold zmaxt_for_dsc - !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -1683,13 +1646,11 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT -!end do else if ( sc_diag_opt == sc_diag_orig ) then ! Original code, only diagnosed if shallow cu or not l_param_conv -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( (l_param_conv .and. & @@ -1707,15 +1668,13 @@ subroutine kmkhz_9c ( & end if end if end do - ! !$OMP end do NOWAIT !$OMP end do -!end do end if ! test on sc_diag_opt if ( l_use_sml_dsc_fixes ) then ! Need to override "NOWAIT" on the previous blocks if going in here: - !$OMP BARRIER + !!$OMP BARRIER ! If conv_diag has diagnosed a SML rising significantly above cloud-base, ! abort any DSC diagnosis higher-up. ! This is because at present, diagnosing an elevated DSC-layer prompts @@ -1727,7 +1686,6 @@ subroutine kmkhz_9c ( & ! The code currently only permits us to have one DSC-layer in the column, ! so if we have a cloudy boundary-layer, we need to reserve the one possible ! DSC for the case where the cloudy SML-top decouples to make a DSC. -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( unstable(i,j) .and. (.not. cumulus(i,j)) .and. dsc(i,j) ) then @@ -1746,7 +1704,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT -! end do end if ! ( l_use_sml_dsc_fixes ) !----------------------------------------------------------------------- @@ -1756,7 +1713,6 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- ! Initialise variables !------------------------------ -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end k_cloud_dsct(i,j) = 0 @@ -1764,14 +1720,12 @@ subroutine kmkhz_9c ( & df_inv_dsc(i,j) = zero end do !$OMP end do -!end do if (l_new_kcloudtop) then !--------------------------------------------------------------------- ! improved method of finding the k_cloud_dsct, the top of the mixed ! layer as seen by radiation !--------------------------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) @@ -1837,7 +1791,6 @@ subroutine kmkhz_9c ( & end do ! i end do ! ii !$OMP end do - !end do ! j !##### else @@ -1845,7 +1798,6 @@ subroutine kmkhz_9c ( & ! original method of finding the k_cloud_dsct, the top of the mixed layer ! as seen by radiation, found to be resolution dependent - !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) @@ -1900,7 +1852,6 @@ subroutine kmkhz_9c ( & end do ! i end do ! ii !$OMP end do - !end do ! j end if ! test on l_new_kcloudtop @@ -1912,7 +1863,6 @@ subroutine kmkhz_9c ( & ! representative of clear-air rad divergence and so subtract this ! `clear-air' part from the grid-level divergence. !----------------------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) @@ -1959,7 +1909,6 @@ subroutine kmkhz_9c ( & end do !i end do !ii !$OMP end do -!end do !----------------------------------------------------------------------- ! 2.4 Set NBDSC, the bottom level of the DSC layer. @@ -1980,7 +1929,6 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do i = ii, min(ii+bl_segment_size-1,pdims%i_end) - !do i = pdims%i_start, pdims%i_end nbdsc(i,j) = ntdsc(i,j)+1 if (dsc(i,j)) then ! The depth of the radiatively-cooled layer tends to be less @@ -2002,7 +1950,6 @@ subroutine kmkhz_9c ( & nbdsc(i,j) = k+1 ! marks lowest level within ML end if end do ! k - !end do ! j end do ! i end do !ii !$OMP end do @@ -2010,7 +1957,6 @@ subroutine kmkhz_9c ( & ! 2.5 Tidy up variables associated with decoupled layer ! NOTE that NTDSC ge 3 if non-zero !---------------------------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end ! Note that ZHSC-Z_UV(NTML+2) may = 0, so this test comes first! @@ -2055,8 +2001,7 @@ subroutine kmkhz_9c ( & df_inv_dsc(i,j) = zero end if end do -!$OMP end do NOWAIT -!end do +!$OMP end do !---------------------------------------------------------------------- !2.6 If decoupled cloud-layer found test to see if it is, in fact, @@ -2077,7 +2022,6 @@ subroutine kmkhz_9c ( & ! ON - taper off surface terms to zero for svl_diff between ! svl_coup and svl_coup_max; also ignore cumulus diags !------------------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end coupled(i,j) = .false. @@ -2109,10 +2053,8 @@ subroutine kmkhz_9c ( & end if ! dsc test end do !$OMP end do -!end do else ! entr_smooth_dec test - !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end coupled(i,j) = .false. @@ -2127,20 +2069,17 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do - !end do end if ! entr_smooth_dec test ! Store current values of ntml and ntdsc for water tracer use if (l_wtrac) then - !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end ntml_start(i,j) = ntml(i,j) ntdsc_start(i,j) = ntdsc(i,j) end do !$OMP end do - !end do end if !----------------------------------------------------------------------- @@ -2164,7 +2103,6 @@ subroutine kmkhz_9c ( & ! marginally affected. Conversely, it allows a subsiding ! inversion to fall more readily. -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) @@ -2553,7 +2491,6 @@ subroutine kmkhz_9c ( & end do !i end do !ii !$OMP end do -!end do !$OMP end PARALLEL @@ -2601,7 +2538,6 @@ subroutine kmkhz_9c ( & ! 4.1 Calculate gradient adjustment terms !----------------------------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP PARALLEL DEFAULT(SHARED) & !$OMP private (i, ii, i_wt, k, kl, km, kp, kp2, kmax, wstar3, c_ws, w_m, & !$OMP pr_neut, w_h, k_cff, virt_factor, z_cbase , zdsc_cbase, dsl_ga, & @@ -2652,20 +2588,15 @@ subroutine kmkhz_9c ( & end do !$OMP end do -!end do ! Water tracers assume flux_grad == Locketal2000 if (l_wtrac) then do i_wt = 1, n_wtrac -! !$OMP do SCHEDULE(STATIC) -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end wtrac_bl(i_wt)%grad_q_adj(i,j) = zero end do !$OMP end do -! end do -! !$OMP end do end do end if @@ -2685,7 +2616,6 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(STATIC) do k = 1, bl_levels - !do j = pdims%j_start, pdims%j_end do i = pdims%i_start, pdims%i_end if (k <= ntml_prev(i,j)) then dsldz(i) = -grcp + grad_t_adj(i,j) @@ -2723,7 +2653,6 @@ subroutine kmkhz_9c ( & end if end do - !end do end do !$OMP end do @@ -2735,8 +2664,6 @@ subroutine kmkhz_9c ( & ! First the SML !--------------- - -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end cloud_base(i,j)= .false. @@ -2765,8 +2692,6 @@ subroutine kmkhz_9c ( & ! to use as first guess or lower limit !----------------------------------------------------------------------- - -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end k_level(i,j) = ntml(i,j) @@ -2782,8 +2707,6 @@ subroutine kmkhz_9c ( & ! end do - -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( cf_sml(i,j) > sc_cftol ) then @@ -2804,8 +2727,6 @@ subroutine kmkhz_9c ( & ! Find lowest level within ML with max CF !-------------------------------------------------- - -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end do k = min(bl_levels, ntml(i,j)+p1), 1, -1 @@ -2825,8 +2746,6 @@ subroutine kmkhz_9c ( & ! end do ! j - -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -2879,8 +2798,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do NOWAIT -!end do - !----------------------------------------------------------------------- @@ -2888,7 +2805,6 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end cloud_base(i,j) = .false. @@ -2906,7 +2822,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT -!end do !------------------------------------------------------------- @@ -2915,7 +2830,6 @@ subroutine kmkhz_9c ( & !------------------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end k_level(i,j) = ntdsc(i,j) @@ -2929,11 +2843,9 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT -!end do -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( cf_dsc(i,j) > sc_cftol ) then @@ -2947,7 +2859,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT -!end do !-------------------------------------------------- @@ -2955,7 +2866,6 @@ subroutine kmkhz_9c ( & !-------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end do k = min(bl_levels,ntdsc(i,j)+p1), 1, -1 @@ -2972,11 +2882,9 @@ subroutine kmkhz_9c ( & end do ! K end do ! I !$OMP end do NOWAIT -!end do ! J -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -3033,7 +2941,6 @@ subroutine kmkhz_9c ( & end do !I !$OMP end do -! end do !J !----------------------------------------------------------------------- @@ -3051,7 +2958,6 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(DYNAMIC) do k = 2, bl_levels - !do j = pdims%j_start, pdims%j_end ! This is to help vectorization do i = pdims%i_start, pdims%i_end @@ -3106,7 +3012,6 @@ subroutine kmkhz_9c ( & db_noga_cld(i,j,k) = db_noga_dry(i,j,k)*(one-cf_for_wb(i)) + & db_noga_cld(i,j,k)*cf_for_wb(i) end do - !end do end do !$OMP end do @@ -3115,7 +3020,6 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end zeta_r_dsc(i,j) = zero @@ -3140,7 +3044,6 @@ subroutine kmkhz_9c ( & z_cld_dsc(i,j) = zero end do !$OMP end do -!end do !----------------------------------------------------------------------- @@ -3148,7 +3051,6 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -3171,7 +3073,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do ! No wait removal due to dimension change? -!end do !----------------------------------------------------------------------- @@ -3183,7 +3084,6 @@ subroutine kmkhz_9c ( & do ii = pdims%i_start, pdims%i_end, bl_segment_size do k = 1, bl_levels do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) - !do i = pdims%i_start, pdims%i_end if ( k <= ntml(i,j)+1 ) then z_cld(i,j) = z_cld(i,j) + & cf(i,j,k) * one_half * dzl(i,j,k) + & @@ -3214,7 +3114,6 @@ subroutine kmkhz_9c ( & cff(i,j,k) * one_half * dzl(i,j,k) end if end if - !end do end do end do end do ! ii @@ -3228,7 +3127,6 @@ subroutine kmkhz_9c ( & !---------------------------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) @@ -3318,15 +3216,11 @@ subroutine kmkhz_9c ( & end do !i end do !ii !$OMP end do -!end do - !-------------------------- ! Then the DSC layer !-------------------------- - -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) @@ -3442,15 +3336,12 @@ subroutine kmkhz_9c ( & end do end do !$OMP end do -!end do !----------------------------------------------------------------------- ! 7.4 Next those terms which depend on the presence of buoyancy reversal !----------------------------------------------------------------------- - -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) @@ -3547,8 +3438,6 @@ subroutine kmkhz_9c ( & ! Initialise variables !------------------------------ - -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -3573,7 +3462,6 @@ subroutine kmkhz_9c ( & ! in the upper half of the BL (ie, restrict search to `close' to ZH) !--------------------------------------------------------------------- - ! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) @@ -3629,7 +3517,6 @@ subroutine kmkhz_9c ( & end do ! i end do ! ii !$OMP end do - !end do ! j else @@ -3638,7 +3525,6 @@ subroutine kmkhz_9c ( & ! as seen by radiation, found to be resolution dependent - !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) @@ -3693,7 +3579,6 @@ subroutine kmkhz_9c ( & end do ! i end do ! ii !$OMP end do -!end do ! j end if ! test on l_new_kcloudtop @@ -3708,7 +3593,6 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) @@ -3756,7 +3640,6 @@ subroutine kmkhz_9c ( & end do !i end do !ii !$OMP end do -!end do ! ------------------------------------------------------------------ @@ -3777,7 +3660,6 @@ subroutine kmkhz_9c ( & ! ------------------------------------------------------------------ -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( k_cloud_top(i,j) == 0 ) k_cloud_top(i,j) = ntml(i,j) @@ -3810,7 +3692,6 @@ subroutine kmkhz_9c ( & if (l_wtrac) then do i_wt = 1, n_wtrac - ! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end fq_nt_zh_wtrac(i,j,i_wt) = fmic_wtrac(i,j,ntml(i,j)+2,i_wt) & @@ -3833,7 +3714,6 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end ntml_save(i,j) = ntml(i,j) ! needed to identify changes @@ -3841,7 +3721,6 @@ subroutine kmkhz_9c ( & dsc_removed(i,j) = 0 end do !$OMP end do NOWAIT -!end do !$OMP end PARALLEL @@ -3869,7 +3748,6 @@ subroutine kmkhz_9c ( & rhof2,rhofsc,f_ngstress,tke_nl,zdsc_base,nbdsc & ) -!do j = pdims%j_start, pdims%j_end !$OMP PARALLEL DEFAULT(SHARED) & !$OMP private (i, i_wt, k, kl, kp, c_ws, c_tke, w_m, tothf_efl, totqf_efl, & !$OMP ml_tend, fa_tend, inv_tend, Prandtl, svl_lapse_rho, & @@ -3899,13 +3777,11 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do -!end do ! Repeat for water tracers if (l_wtrac) then do i_wt = 1, n_wtrac - ! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( dsc(i,j) .and. .not. dsc_save(i,j) ) then @@ -3921,8 +3797,6 @@ subroutine kmkhz_9c ( & if ( l_use_sml_dsc_fixes ) then - - ! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( dsc_removed(i,j) == 1 ) then @@ -3953,7 +3827,6 @@ subroutine kmkhz_9c ( & ! Repeat for water tracers if (l_wtrac) then do i_wt = 1, n_wtrac - !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( dsc_removed(i,j) == 1 ) then @@ -3967,14 +3840,12 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do - !end do end do end if else ! not l_use_sml_dsc_fixes - !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( .not. dsc(i,j) .and. dsc_save(i,j) ) then @@ -4001,14 +3872,12 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do - !end do ! Repeat for water tracers if (l_wtrac) then do i_wt = 1, n_wtrac - !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( .not. dsc(i,j) .and. dsc_save(i,j) ) then @@ -4024,7 +3893,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do - !end do end do end if @@ -4037,8 +3905,6 @@ subroutine kmkhz_9c ( & ! Calculate the non-turbulent fluxes at the DSC base ! ------------------------------------------------------------------ - -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end ft_nt_dscb(i,j) = ft_nt(i,j,1) @@ -4080,8 +3946,6 @@ subroutine kmkhz_9c ( & !..ie. the inversion is well-defined) !----------------------------------------------------------------------- - -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -4177,7 +4041,6 @@ subroutine kmkhz_9c ( & end if ! test on SML_DISC_INV, etc end do !$OMP end do NOWAIT -!end do !----------------------------------------------------------------------- @@ -4194,7 +4057,6 @@ subroutine kmkhz_9c ( & c_tke = 1.33_r_bl/(vkman*c_ws**two_thirds) -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -4339,15 +4201,12 @@ subroutine kmkhz_9c ( & end do !$OMP end do NOWAIT -!end do !------------------------------------------------- !..Second the decoupled mixed layer, if entraining !------------------------------------------------- - -!do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -4444,8 +4303,6 @@ subroutine kmkhz_9c ( & !..flux at the DSC base and the parametrized flux at the inversion !----------------------------------------------------------------------- - -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -4504,8 +4361,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do NOWAIT -!end do - !----------------------------------------------------------------------- ! Specify QW entrainment fluxes @@ -4519,8 +4374,6 @@ subroutine kmkhz_9c ( & ! the inversion grid-level is physically within the BL) ! ------------------------------------------------------------------ - -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end fq_nt_dscb(i,j) = fq_nt(i,j,1) @@ -4541,7 +4394,6 @@ subroutine kmkhz_9c ( & ! Repeat for water tracers if (l_wtrac) then do i_wt = 1, n_wtrac - ! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end wtrac_bl(i_wt)%fq_nt_dscb(i,j) = wtrac_bl(i_wt)%fq_nt(i,j,1) @@ -4566,8 +4418,6 @@ subroutine kmkhz_9c ( & ! microphysical and subsidence fluxes are correctly coupled. !----------------------------------------------------------------------- - -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end moisten(i,j) = .false. @@ -4661,7 +4511,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do -!end do !$OMP end PARALLEL @@ -4672,14 +4521,12 @@ subroutine kmkhz_9c ( & allocate(z_uv_ntmlp1(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end)) - !do j = pdims%j_start, pdims%j_end !$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(SHARED) private(i,k) do i = pdims%i_start, pdims%i_end k = ntml(i,j) + 1 z_uv_ntmlp1(i,j) = z_uv(i,j,ntml(i,j)+1) end do !$OMP end PARALLEL do - !end do call calc_fqw_inv_wtrac(bl_levels, ntml, totqf_efl_meth1, & @@ -4695,7 +4542,6 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- ! Now decoupled layer !----------------------------------------------------------------------- -!do j = pdims%j_start, pdims%j_end !$OMP PARALLEL do SCHEDULE(STATIC) DEFAULT(SHARED) & !$OMP private ( i, k, totqf_efl, ml_tend, fa_tend, inv_tend) do i = pdims%i_start, pdims%i_end @@ -4781,7 +4627,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end PARALLEL do -!end do ! Repeat last block of code for water tracers if (l_wtrac) then @@ -4803,7 +4648,6 @@ subroutine kmkhz_9c ( & if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then - ! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -4882,8 +4726,6 @@ subroutine kmkhz_9c ( & ! grid-level so only one element of these 3D arrays is used. !----------------------------------------------------------------------- - -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end we_lim(i,j,1) = zero @@ -4903,8 +4745,6 @@ subroutine kmkhz_9c ( & ! end do ! j - -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end kent(i,j) = ntml(i,j)+1 @@ -4945,8 +4785,6 @@ subroutine kmkhz_9c ( & ! timestep's ZH (code from SF_EXCH) !----------------------------------------------------------------------- - -! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( unstable(i,j) ) then @@ -5011,7 +4849,6 @@ subroutine kmkhz_9c ( & if (BL_diag%l_dzh) then - !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end ! fill unset values (rmdi<0) with zero @@ -5023,11 +4860,9 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT - !end do end if if (BL_diag%l_dscbase) then - ! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( dsc(i,j) ) then @@ -5042,7 +4877,6 @@ subroutine kmkhz_9c ( & end if if (BL_diag%l_cldbase) then - ! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( dsc(i,j) ) then @@ -5057,7 +4891,6 @@ subroutine kmkhz_9c ( & end if if (BL_diag%l_weparm_dsc) then - ! do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( dsc(i,j) ) then @@ -5072,13 +4905,11 @@ subroutine kmkhz_9c ( & end if if (BL_diag%l_weparm) then - !do j = pdims%j_start, pdims%j_end !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end BL_diag%weparm(i,j)= we_parm(i,j) end do !$OMP end do NOWAIT - !end do end if From da86c9c3031e505bd4b040b6b9500e9a06456cf2 Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Wed, 18 Feb 2026 10:53:19 +0000 Subject: [PATCH 09/14] Leave barriers, further nowait tidy, correct new line formatting --- .../source/boundary_layer/kmkhz_9c.F90 | 569 +++++++++--------- 1 file changed, 284 insertions(+), 285 deletions(-) diff --git a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 index 27b0d6fa7..9613c4588 100644 --- a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 +++ b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 @@ -897,8 +897,6 @@ subroutine kmkhz_9c ( & integer :: & i, & ! Loop counter (horizontal field index). - j, & - ! Offset counter in certain I loops. k, & ! Loop counter (vertical level index). kl, & @@ -912,6 +910,8 @@ subroutine kmkhz_9c ( & ! limit on levels within which to search for ! the max LW radiative cooling +integer, parameter :: j = 1 ! Loop counter, horizontal - LFRic Parameter + integer :: i_wt ! Water tracer counter real(r_bl) :: w_var_inv ! vertical velocity variance at discontinuous inversions @@ -1011,11 +1011,10 @@ subroutine kmkhz_9c ( & dz_disc_min = one_half * timestep * 1.0e-4_r_bl -j = 1 !Start OpenMP parallel region !$OMP PARALLEL DEFAULT(SHARED) & -!$OMP private (i, ii, k, kp, kl, km, i_wt, w_curv_nm, w_del_nm, w_curv, & +!$OMP private (i, ii, k, kp, kl, km, i_wt, w_curv_nm, w_del_nm, w_curv, & !$OMP r_d_eta, rho_dz, z_surf, sl_plume, qw_plume, q_liq_parc, q_liq_env, & !$OMP t_parc, q_vap_parc, t_dens_parc, t_dens_env, dpar_bydz, denv_bydz, & !$OMP z_rad_lim, k_rad_lim, dflw_inv, dfsw_inv, dfsw_top, svl_plume, & @@ -1061,9 +1060,9 @@ subroutine kmkhz_9c ( & end do end do - k = bl_levels + !k = bl_levels do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) - z_top(i,j,k) = z_uv(i,j,k) + dzl(i,j,k) + z_top(i,j,bl_levels) = z_uv(i,j,bl_levels) + dzl(i,j,bl_levels) end do end do ! ii !$OMP end do @@ -1132,9 +1131,9 @@ subroutine kmkhz_9c ( & ! directive stop vectorization of this loop when an Intel Compiler ! is used. Other compilers, for example Cray, should vectorise this ! loop automatically. -! #if defined (IFORT_VERSION) -! !DIR$ NOVECTOR -! #endif +#if defined (IFORT_VERSION) +!DIR$ NOVECTOR +#endif w_grad(i,j,k) = (w(i,j,k)-w(i,j,km))*rdz(i,j,k) w_curv_nm = w(i,j,kp)-2.0_r_bl*w(i,j,k)+w(i,j,km) w_del_nm = w(i,j,kp)-w(i,j,km) @@ -1146,14 +1145,14 @@ subroutine kmkhz_9c ( & !$OMP end do end do ! k -!!$OMP BARRIER +!$OMP BARRIER !$OMP do SCHEDULE(DYNAMIC) do ii = pdims%i_start, pdims%i_end, bl_segment_size do k = 2, bl_levels-1 do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) - if ( etadot(i,j,k) < - tiny(one) .and. & + if ( etadot(i,j,k) < - tiny(one) .and. & etadot(i,j,k-1)< - tiny(one) ) then !----------------------------------------------------------- ! Only needed in subsidence regions @@ -1173,9 +1172,9 @@ subroutine kmkhz_9c ( & w(i,j,k+1) = zero else r_d_eta=1.0/(eta_theta_levels(k+1)-eta_theta_levels(k)) - sls_inc(i,j,k) = - etadot(i,j,k) * r_d_eta & + sls_inc(i,j,k) = - etadot(i,j,k) * r_d_eta & * ( sl(i,j,k+1) - sl(i,j,k) ) - qls_inc(i,j,k) = - etadot(i,j,k) * r_d_eta & + qls_inc(i,j,k) = - etadot(i,j,k) * r_d_eta & * ( qw(i,j,k+1) - qw(i,j,k) ) end if ! safe to calculate increments end if @@ -1202,7 +1201,7 @@ subroutine kmkhz_9c ( & do k = 2, bl_levels-1 do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) - if ( etadot(i,j,k) < - tiny(one) .and. & + if ( etadot(i,j,k) < - tiny(one) .and. & etadot(i,j,k-1)< - tiny(one) ) then !----------------------------------------------------------- ! Only needed in subsidence regions @@ -1221,7 +1220,7 @@ subroutine kmkhz_9c ( & km = kp-1 r_d_eta=one/(eta_theta_levels(kp)-eta_theta_levels(km)) do i_wt = 1, n_wtrac - qls_inc_wtrac(i,j,k,i_wt) = - etadot(i,j,k) * r_d_eta & + qls_inc_wtrac(i,j,k,i_wt) = - etadot(i,j,k) * r_d_eta & * ( wtrac_bl(i_wt)%qw(i,j,kp) - wtrac_bl(i_wt)%qw(i,j,km) ) end do end if ! safe to calculate increments @@ -1319,15 +1318,15 @@ subroutine kmkhz_9c ( & kp = k+1 do i = pdims%i_start, pdims%i_end rho_dz = rho_mix_tq(i,j,k) * dzl(i,j,k) - dfmic_wtrac(i,j,k,i_wt) = & + dfmic_wtrac(i,j,k,i_wt) = & - wtrac_as(i_wt)%micro_tends(i,j,k) * rho_dz dfsubs_wtrac(i,j,k,i_wt) = - qls_inc_wtrac(i,j,k,i_wt) * rho_dz - fsubs_wtrac(i,j,kp,i_wt)= & + fsubs_wtrac(i,j,kp,i_wt)= & fsubs_wtrac(i,j,k,i_wt) + dfsubs_wtrac(i,j,k,i_wt) - fmic_wtrac(i,j,kp,i_wt) = & + fmic_wtrac(i,j,kp,i_wt) = & fmic_wtrac(i,j,k,i_wt) + dfmic_wtrac(i,j,k,i_wt) - wtrac_bl(i_wt)%fq_nt(i,j,kp) = & + wtrac_bl(i_wt)%fq_nt(i,j,kp) = & fmic_wtrac(i,j,kp,i_wt) + fsubs_wtrac(i,j,kp,i_wt) end do ! i end do ! k @@ -1363,7 +1362,7 @@ subroutine kmkhz_9c ( & !reached z_surf k_plume(i,j)=k end if - if ( svl(i,j,k+1) >= svl(i,j,k) & + if ( svl(i,j,k+1) >= svl(i,j,k) & .and. k_plume(i,j) == -1 ) then !reached inversion k_plume(i,j)=k @@ -1415,19 +1414,19 @@ subroutine kmkhz_9c ( & !..Find cloud-base (where cloud here means CF > SC_CFTOL) !----------------------------------------------------------------- - if ( .not. cumulus(i,j) .and. & - z_tq(i,j,k) < zmaxb_for_dsc .and. & - k > ntml(i,j)+1 .and. cf(i,j,k) > sc_cftol & - .and. .not. cloud_base(i,j) & + if ( .not. cumulus(i,j) .and. & + z_tq(i,j,k) < zmaxb_for_dsc .and. & + k > ntml(i,j)+1 .and. cf(i,j,k) > sc_cftol & + .and. .not. cloud_base(i,j) & ! not yet found cloud-base .and. .not. dsc(i,j) ) then ! not yet found a Sc layer cloud_base(i,j) = .true. end if - if ( cloud_base(i,j) .and. .not. dsc(i,j) .and. & + if ( cloud_base(i,j) .and. .not. dsc(i,j) .and. & ! found cloud-base but not yet reached cloud-top - cf(i,j,k+1) < sc_cftol .and. & - z_tq(i,j,k) < zmaxt_for_dsc & + cf(i,j,k+1) < sc_cftol .and. & + z_tq(i,j,k) < zmaxt_for_dsc & ! got to cloud-top below ZMAXT_FOR_DSC ) then cloud_base(i,j) = .false. ! reset CLOUD_BASE @@ -1438,14 +1437,14 @@ subroutine kmkhz_9c ( & ! Parcel descent in Section 4.0 below will determine depth ! of mixed layer. !---------------------------------------------------------- - if ( (svl(i,j,k)-svl(i,j,k-1)) & - /(z_tq(i,j,k)-z_tq(i,j,k-1)) & + if ( (svl(i,j,k)-svl(i,j,k-1)) & + /(z_tq(i,j,k)-z_tq(i,j,k-1)) & < max_svl_grad ) then dsc(i,j) = .true. ntdsc(i,j) = k zhsc(i,j) = z_uv(i,j,ntdsc(i,j)+1) - else if ( (svl(i,j,k-1)-svl(i,j,k-2)) & - /(z_tq(i,j,k-1)-z_tq(i,j,k-2)) & + else if ( (svl(i,j,k-1)-svl(i,j,k-2)) & + /(z_tq(i,j,k-1)-z_tq(i,j,k-2)) & < max_svl_grad ) then !--------------------------------------------------------- ! Well-mixed layer with top at k-1 or k. Check whether @@ -1461,51 +1460,51 @@ subroutine kmkhz_9c ( & ! environmental temperature. ! ------------------------------------------------------------ if (t(i,j,k) > tm) then - q_liq_parc = max( zero, ( qw_plume - qs(i,j,k) - & - dqsdt(i,j,k)* & - ( sl_plume-grcp*z_tq(i,j,k)-t(i,j,k) ) & + q_liq_parc = max( zero, ( qw_plume - qs(i,j,k) - & + dqsdt(i,j,k)* & + ( sl_plume-grcp*z_tq(i,j,k)-t(i,j,k) ) & ) *a_qs(i,j,k) ) - q_liq_env = max( zero, ( qw(i,j,k) - qs(i,j,k) & - -dqsdt(i,j,k)*( tl(i,j,k) - t(i,j,k) ) & + q_liq_env = max( zero, ( qw(i,j,k) - qs(i,j,k) & + -dqsdt(i,j,k)*( tl(i,j,k) - t(i,j,k) ) & ) *a_qs(i,j,k) ) ! add on the difference in the environment's ql as ! calculated by the partial condensation scheme (using ! some RH_CRIT value) and what it would be if ! RH_CRIT=1. This then imitates partial condensation in ! the parcel. - q_liq_parc = q_liq_parc + qcl(i,j,k) + qcf(i,j,k) & + q_liq_parc = q_liq_parc + qcl(i,j,k) + qcf(i,j,k) & - q_liq_env - t_parc = sl_plume - grcp * z_tq(i,j,k) + & + t_parc = sl_plume - grcp * z_tq(i,j,k) + & lcrcp*q_liq_parc else - q_liq_parc = max( zero, ( qw_plume - qs(i,j,k) - & - dqsdt(i,j,k)* & - ( sl_plume - grcp*z_tq(i,j,k)-t(i,j,k) ) & + q_liq_parc = max( zero, ( qw_plume - qs(i,j,k) - & + dqsdt(i,j,k)* & + ( sl_plume - grcp*z_tq(i,j,k)-t(i,j,k) ) & ) *a_qs(i,j,k) ) - q_liq_env = max( zero, ( qw(i,j,k) - qs(i,j,k) & - -dqsdt(i,j,k)*( tl(i,j,k) - t(i,j,k) ) & + q_liq_env = max( zero, ( qw(i,j,k) - qs(i,j,k) & + -dqsdt(i,j,k)*( tl(i,j,k) - t(i,j,k) ) & ) *a_qs(i,j,k) ) ! add on difference in environment's ql between RH_CRIT and ! RH_CRIT=1 - q_liq_parc = q_liq_parc + qcl(i,j,k) + qcf(i,j,k) & + q_liq_parc = q_liq_parc + qcl(i,j,k) + qcf(i,j,k) & - q_liq_env - t_parc = sl_plume - grcp * z_tq(i,j,k) + & + t_parc = sl_plume - grcp * z_tq(i,j,k) + & lsrcp*q_liq_parc end if q_vap_parc=qw_plume - q_liq_parc t_dens_parc=t_parc*(one+c_virtual*q_vap_parc-q_liq_parc) - t_dens_env=t(i,j,k)* & + t_dens_env=t(i,j,k)* & (one+c_virtual*q(i,j,k)-qcl(i,j,k)-qcf(i,j,k)) ! find vertical gradients in parcel and environment SVL ! (using values from level below (K-1)) - env_svl_km1(i,j) = t(i,j,k-1) * ( one+c_virtual*q(i,j,k-1) & + env_svl_km1(i,j) = t(i,j,k-1) * ( one+c_virtual*q(i,j,k-1) & -qcl(i,j,k-1)-qcf(i,j,k-1) ) + grcp*z_tq(i,j,k-1) - dpar_bydz=(t_dens_parc+grcp*z_tq(i,j,k)- & - env_svl_km1(i,j)) / & + dpar_bydz=(t_dens_parc+grcp*z_tq(i,j,k)- & + env_svl_km1(i,j)) / & (z_tq(i,j,k)-z_tq(i,j,k-1)) - denv_bydz=(t_dens_env+grcp*z_tq(i,j,k)- & - env_svl_km1(i,j))/ & + denv_bydz=(t_dens_env+grcp*z_tq(i,j,k)- & + env_svl_km1(i,j))/ & (z_tq(i,j,k)-z_tq(i,j,k-1)) if ( denv_bydz > 1.25_r_bl*dpar_bydz ) then @@ -1554,8 +1553,8 @@ subroutine kmkhz_9c ( & do k = 1, bl_levels-1 !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end - if ( ( cumulus(i,j) .and. z_tq(i,j,k) > z_lcl(i,j) ) .or. & - ( sc_diag_opt == sc_diag_all_rh_max .and. (.not. cumulus(i,j)) & + if ( ( cumulus(i,j) .and. z_tq(i,j,k) > z_lcl(i,j) ) .or. & + ( sc_diag_opt == sc_diag_all_rh_max .and. (.not. cumulus(i,j)) & .and. k > ntml(i,j)+1 ) ) then ! If sc_diag_opt == sc_diag_cu_rh_max, only check cumulus points ! at heights above the LCL. @@ -1612,7 +1611,7 @@ subroutine kmkhz_9c ( & if ( rht_kp2 < rht_kp1 ) then ! RHt(k+1) lies between RHt(k) and RHt(k+2); compute fraction interp = (rht_kp1 - rht_kp2) / (rht_k - rht_kp2) - zhsc(i,j) = (one-interp) * z_uv(i,j,k+1) & + zhsc(i,j) = (one-interp) * z_uv(i,j,k+1) & + interp * z_uv(i,j,kp2) else ! Rht(k+1) is a local minimum; can't construct k+1 as a fraction @@ -1622,7 +1621,7 @@ subroutine kmkhz_9c ( & end if end if ! ( ntdsc(i,j) > 0 ) end do - !$OMP end do NOWAIT + !$OMP end do else if ( sc_diag_opt == sc_diag_cu_relax ) then @@ -1634,9 +1633,9 @@ subroutine kmkhz_9c ( & k = ntpar(i,j) if ( cumulus(i,j) .and. k < bl_levels ) then ! cumulus layer within BL_LEVELS - if ( z_tq(i,j,k) < zmaxt_for_dsc .and. & + if ( z_tq(i,j,k) < zmaxt_for_dsc .and. & ! cloud top below zmaxt_for_dsc - ( max( cf(i,j,k-1),cf(i,j,k),cf(i,j,k+1) ) > sc_cftol ) & + ( max( cf(i,j,k-1),cf(i,j,k),cf(i,j,k+1) ) > sc_cftol ) & ! cloud-top sufficiently cloudy ) then dsc(i,j) = .true. @@ -1653,13 +1652,13 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end - if ( (l_param_conv .and. & - l_shallow(i,j) .and. ntpar(i,j) < bl_levels ) & + if ( (l_param_conv .and. & + l_shallow(i,j) .and. ntpar(i,j) < bl_levels ) & ! shallow cumulus layer within BL_LEVELS - .or. (.not. l_param_conv .and. & + .or. (.not. l_param_conv .and. & cumulus(i,j) .and. ntpar(i,j) < bl_levels ) ) then ! cumulus layer and inversion found - if ( cf(i,j,ntpar(i,j)) > sc_cftol .or. & + if ( cf(i,j,ntpar(i,j)) > sc_cftol .or. & cf(i,j,ntpar(i,j)+1) > sc_cftol ) then ! cloudy dsc(i,j) = .true. @@ -1674,7 +1673,7 @@ subroutine kmkhz_9c ( & if ( l_use_sml_dsc_fixes ) then ! Need to override "NOWAIT" on the previous blocks if going in here: - !!$OMP BARRIER + !$OMP BARRIER ! If conv_diag has diagnosed a SML rising significantly above cloud-base, ! abort any DSC diagnosis higher-up. ! This is because at present, diagnosing an elevated DSC-layer prompts @@ -1874,10 +1873,10 @@ subroutine kmkhz_9c ( & k = k_cloud_dsct(i,j)+1 if ( k < bl_levels ) then dflw_inv = dflw_over_cp(i,j,k) & - - dflw_over_cp(i,j,k+1) & + - dflw_over_cp(i,j,k+1) & * dzl(i,j,k)/dzl(i,j,k+1) dfsw_inv = dfsw_over_cp(i,j,k) & - - dfsw_over_cp(i,j,k+1) & + - dfsw_over_cp(i,j,k+1) & * dzl(i,j,k)/dzl(i,j,k+1) else dflw_inv = dflw_over_cp(i,j,k) @@ -1889,11 +1888,11 @@ subroutine kmkhz_9c ( & df_inv_dsc(i,j) = dflw_inv + dfsw_inv df_dsct_over_cp(i,j) = frad_lw(i,j,k_cloud_dsct(i,j)+1) & - - frad_lw(i,j,k_level(i,j)) & + - frad_lw(i,j,k_level(i,j)) & + dflw_inv dfsw_top = frad_sw(i,j,k_cloud_dsct(i,j)+1) & - - frad_sw(i,j,k_level(i,j)) & + - frad_sw(i,j,k_level(i,j)) & + dfsw_inv !----------------------------------------------------------- @@ -1940,7 +1939,7 @@ subroutine kmkhz_9c ( & k = ntdsc(i,j) rho_dz = rho_mix_tq(i,j,k) * dzl(i,j,k) - svl_plume=svl(i,j,k-1) & + svl_plume=svl(i,j,k-1) & - ct_resid * dzl(i,j,k)*df_dsct_over_cp(i,j) / ( 50.0_r_bl*rho_dz ) else svl_plume=zero @@ -1960,7 +1959,7 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end ! Note that ZHSC-Z_UV(NTML+2) may = 0, so this test comes first! - if (cumulus(i,j) .and. dsc(i,j)) & + if (cumulus(i,j) .and. dsc(i,j)) & nbdsc(i,j) = max( nbdsc(i,j), ntml(i,j)+2 ) if ( ntdsc(i,j) >= 1 ) then if ( nbdsc(i,j) < ntdsc(i,j)+1 ) then @@ -1975,7 +1974,7 @@ subroutine kmkhz_9c ( & !---------------------------------------------------------- ! Indicates a layer of zero depth !---------------------------------------------------------- - if ( ( sc_diag_opt==sc_diag_orig .or. sc_diag_opt==sc_diag_cu_relax ) & + if ( ( sc_diag_opt==sc_diag_orig .or. sc_diag_opt==sc_diag_cu_relax ) & .and. ntdsc(i,j) == ntpar(i,j) ) then !---------------------------------------------------------- ! Indicates a Sc layer at the top of Cu: force mixing @@ -2032,18 +2031,18 @@ subroutine kmkhz_9c ( & ! - avoid ntdsc as can be within base of inversion !------------------------------------------------------------- svl_diff = zero - if ( ntdsc(i,j) >= 2 ) & + if ( ntdsc(i,j) >= 2 ) & svl_diff = svl(i,j,ntdsc(i,j)-1) - svl(i,j,ntml(i,j)) if ( svl_diff < svl_coup_max ) then coupled(i,j) = .true. - svl_diff_frac(i,j) = one - max( zero, & + svl_diff_frac(i,j) = one - max( zero, & (svl_diff-svl_coup)/(svl_coup_max-svl_coup) ) ! to give 1 for svl_diff= rbl_eps ) then ! ...quadratic if QUAD_A /= 0 dz_disc = ( quad_bm - sqrt( quad_bm*quad_bm & - - 4.0_r_bl*quad_a*quad_c ) & + - 4.0_r_bl*quad_a*quad_c ) & ) / (2.0_r_bl*quad_a) else ! ...linear if QUAD_A == 0 @@ -2351,11 +2350,11 @@ subroutine kmkhz_9c ( & quad_a = one_half*( svl_lapse - svl_lapse_base ) quad_bm = svl(i,j,k+2) - svl(i,j,k) & - - svl_lapse * ( z_tq(i,j,k+2)-z_uv(i,j,k+2) ) & - - svl_lapse_base * ( z_uv(i,j,k+1)-z_tq(i,j,k) + & + - svl_lapse * ( z_tq(i,j,k+2)-z_uv(i,j,k+2) ) & + - svl_lapse_base * ( z_uv(i,j,k+1)-z_tq(i,j,k) + & dzl(i,j,k+1) ) quad_c = dzl(i,j,k+1)*( svl(i,j,k+1) - svl(i,j,k) - & - svl_lapse_base * ( & + svl_lapse_base * ( & z_uv(i,j,k+1)-z_tq(i,j,k) + one_half*dzl(i,j,k+1) ) ) if ( quad_bm > zero ) then @@ -2368,7 +2367,7 @@ subroutine kmkhz_9c ( & if ( abs(quad_a) >= rbl_eps ) then ! ...quadratic if QUAD_A ne 0 dz_disc = ( quad_bm - sqrt( quad_bm*quad_bm & - - 4.0_r_bl*quad_a*quad_c ) & + - 4.0_r_bl*quad_a*quad_c ) & ) / (2.0_r_bl*quad_a) else ! ...linear if QUAD_A = 0 @@ -2554,7 +2553,7 @@ subroutine kmkhz_9c ( & ! the previous timestep (assumes T1_SD has not changed much, ! which in turn assumes the surface fluxes have not) if (flux_grad == Locketal2000) then - grad_t_adj(i,j) = min( max_t_grad , & + grad_t_adj(i,j) = min( max_t_grad , & a_grad_adj * t1_sd(i,j) / zh_prev(i,j) ) grad_q_adj(i,j) = zero else if (flux_grad == HoltBov1993) then @@ -2565,7 +2564,7 @@ subroutine kmkhz_9c ( & c_ws = 0.6_r_bl w_m =( v_s(i,j)**3 + c_ws*wstar3 )**one_third - grad_t_adj(i,j) = a_ga_hb93*(wstar3**one_third)*ftl(i,j,1) & + grad_t_adj(i,j) = a_ga_hb93*(wstar3**one_third)*ftl(i,j,1) & / ( rhostar_gb(i,j)*w_m*w_m*zh_prev(i,j) ) ! GRAD_Q_ADJ(I,j) = A_GA_HB93*(WSTAR3**one_third)*FQW(I,j,1) ! / ( RHOSTAR_GB(I,j)*W_M*W_M*ZH_PREV(I,j) ) @@ -2579,9 +2578,9 @@ subroutine kmkhz_9c ( & pr_neut = 0.75_r_bl w_h = ( ( v_s(i,j)**3+c_ws*wstar3 )**one_third )/ pr_neut - grad_t_adj(i,j) = a_ga_lw06 * ftl(i,j,1) & + grad_t_adj(i,j) = a_ga_lw06 * ftl(i,j,1) & / ( rhostar_gb(i,j)*w_h*zh_prev(i,j) ) - grad_q_adj(i,j) = a_ga_lw06 * fqw(i,j,1) & + grad_q_adj(i,j) = a_ga_lw06 * fqw(i,j,1) & / ( rhostar_gb(i,j)*w_h*zh_prev(i,j) ) end if end if ! test on UNSTABLE @@ -2627,25 +2626,25 @@ subroutine kmkhz_9c ( & !DIR$ NOFUSION !DIR$ VECTOR ALWAYS do i = pdims%i_start, pdims%i_end - virt_factor = one + c_virtual*q(i,j,k) - qcl(i,j,k) - & + virt_factor = one + c_virtual*q(i,j,k) - qcl(i,j,k) - & qcf(i,j,k) - dqcldz(i,j,k) = -( dsldz(i)*dqsdt(i,j,k) & - + g*qs(i,j,k)/(r*t(i,j,k)*virt_factor) ) & + dqcldz(i,j,k) = -( dsldz(i)*dqsdt(i,j,k) & + + g*qs(i,j,k)/(r*t(i,j,k)*virt_factor) ) & / ( one + lcrcp*dqsdt(i,j,k) ) - dqcfdz(i,j,k) = -( dsldz(i)*dqsdt(i,j,k) & - + g*qs(i,j,k)/(r*t(i,j,k)*virt_factor) ) * fgf & + dqcfdz(i,j,k) = -( dsldz(i)*dqsdt(i,j,k) & + + g*qs(i,j,k)/(r*t(i,j,k)*virt_factor) ) * fgf & / ( one + lsrcp*dqsdt(i,j,k) ) end do ! limit calculation to greater than a small cloud fraction !DIR$ NOFUSION do i = pdims%i_start, pdims%i_end - if ( qcl(i,j,k) + qcf(i,j,k) > zero & + if ( qcl(i,j,k) + qcf(i,j,k) > zero & .and. cf(i,j,k) > 1.0e-3_r_bl ) then - cfl(i,j,k) = cf(i,j,k) * qcl(i,j,k) / & + cfl(i,j,k) = cf(i,j,k) * qcl(i,j,k) / & ( qcl(i,j,k) + qcf(i,j,k) ) - cff(i,j,k) = cf(i,j,k) * qcf(i,j,k) / & + cff(i,j,k) = cf(i,j,k) * qcf(i,j,k) / & ( qcl(i,j,k) + qcf(i,j,k) ) else cfl(i,j,k) = zero @@ -2697,7 +2696,7 @@ subroutine kmkhz_9c ( & k_level(i,j) = ntml(i,j) if ( cf_sml(i,j) > sc_cftol ) then if ( .not. l_check_ntp1 ) k_level(i,j) = ntml(i,j)-1 - do while ( cf(i,j,max(k_level(i,j),1)) > sc_cftol & + do while ( cf(i,j,max(k_level(i,j),1)) > sc_cftol & .and. k_level(i,j) >= 2 ) k_level(i,j) = k_level(i,j) - 1 end do @@ -2710,7 +2709,7 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( cf_sml(i,j) > sc_cftol ) then - if ( k_level(i,j) == 1 .and. & + if ( k_level(i,j) == 1 .and. & cf(i,j,max(k_level(i,j),1)) > sc_cftol) then z_cf_base(i,j) = zero else @@ -2730,7 +2729,7 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end do k = min(bl_levels, ntml(i,j)+p1), 1, -1 - if ( .not. cloud_base(i,j) .and. & + if ( .not. cloud_base(i,j) .and. & cf_sml(i,j) > sc_cftol ) then ! within cloudy boundary layer if ( k == 1) then @@ -2756,13 +2755,13 @@ subroutine kmkhz_9c ( & !-------------------------------------------------- if ( cloud_base(i,j) .and. k_cbase(i,j) /= 0 ) then - z_cbase = z_tq(i,j,k_cbase(i,j)) - & - qcl(i,j,k_cbase(i,j)) / & + z_cbase = z_tq(i,j,k_cbase(i,j)) - & + qcl(i,j,k_cbase(i,j)) / & ( cf(i,j,k_cbase(i,j))*dqcldz(i,j,k_cbase(i,j)) ) if ( dqcfdz(i,j,k_cbase(i,j)) > zero ) then - z_cbase = min( z_cbase, z_tq(i,j,k_cbase(i,j)) - & - qcf(i,j,k_cbase(i,j)) / & - ( cf(i,j,k_cbase(i,j))*dqcfdz(i,j,k_cbase(i,j)) ) & + z_cbase = min( z_cbase, z_tq(i,j,k_cbase(i,j)) - & + qcf(i,j,k_cbase(i,j)) / & + ( cf(i,j,k_cbase(i,j))*dqcfdz(i,j,k_cbase(i,j)) ) & ) else !--------------------------------------------------------- @@ -2772,25 +2771,25 @@ subroutine kmkhz_9c ( & !Initialise K_CFF = lowest level with ice cloud k_cff = k_cbase(i,j) if (k_cff > 1) then - do while ( cff(i,j,k_cff) > sc_cftol & + do while ( cff(i,j,k_cff) > sc_cftol & .and. k_cff > 1 ) k_cff = k_cff - 1 end do end if - if ( cff(i,j,k_cff) <= sc_cftol .and. & - k_cff < k_cbase(i,j) ) & + if ( cff(i,j,k_cff) <= sc_cftol .and. & + k_cff < k_cbase(i,j) ) & k_cff = k_cff + 1 ! will want to raise K_CFF back up one level unless ! level 1 is cloudy or no sig frozen cloud at all - z_cbase = min( z_cbase, z_top(i,j,k_cff) - & - dzl(i,j,k_cff) & + z_cbase = min( z_cbase, z_top(i,j,k_cff) - & + dzl(i,j,k_cff) & * cff(i,j,k_cff)/cf(i,j,k_cff) ) end if !------------------------------------------------------ ! use cloud-base as seen by cloud scheme as lower limit ! and base of level NTML+1 as upper limit !------------------------------------------------------ - z_cbase = min( z_uv(i,j,ntml(i,j)+1), & + z_cbase = min( z_uv(i,j,ntml(i,j)+1), & max( z_cf_base(i,j), z_cbase) ) zc(i,j) = z_ctop(i,j) - z_cbase @@ -2836,7 +2835,7 @@ subroutine kmkhz_9c ( & if ( cf_dsc(i,j) > sc_cftol ) then ! assume level NTDSC is cloudy so start from NTDSC-1 if ( .not. l_check_ntp1 ) k_level(i,j) = max( 2, ntdsc(i,j) - 1 ) - do while ( cf(i,j,k_level(i,j)) > sc_cftol & + do while ( cf(i,j,k_level(i,j)) > sc_cftol & .and. k_level(i,j) >= 2 ) k_level(i,j) = k_level(i,j) - 1 end do @@ -2849,7 +2848,7 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( cf_dsc(i,j) > sc_cftol ) then - if ( k_level(i,j) == 1 .and. & + if ( k_level(i,j) == 1 .and. & cf(i,j,max(k_level(i,j),1)) > sc_cftol) then z_cf_base(i,j) = zero else @@ -2869,7 +2868,7 @@ subroutine kmkhz_9c ( & !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end do k = min(bl_levels,ntdsc(i,j)+p1), 1, -1 - if ( .not. cloud_base(i,j) .and. & + if ( .not. cloud_base(i,j) .and. & cf_dsc(i,j) > sc_cftol ) then ! within cloudy boundary layer if ( k == 1) then @@ -2893,19 +2892,19 @@ subroutine kmkhz_9c ( & ! from in-cloud qcl in level K_CBASE !-------------------------------------------------- if ( cloud_base(i,j) .and. k_cbase(i,j) /= 0 ) then - z_cbase = z_tq(i,j,k_cbase(i,j)) - & - qcl(i,j,k_cbase(i,j)) / & + z_cbase = z_tq(i,j,k_cbase(i,j)) - & + qcl(i,j,k_cbase(i,j)) / & ( cf(i,j,k_cbase(i,j))*dqcldz(i,j,k_cbase(i,j)) ) if ( dqcfdz(i,j,k_cbase(i,j)) > zero ) then - z_cbase = min( z_cbase, z_tq(i,j,k_cbase(i,j)) - & - qcf(i,j,k_cbase(i,j)) / & - ( cf(i,j,k_cbase(i,j))*dqcfdz(i,j,k_cbase(i,j)) ) & + z_cbase = min( z_cbase, z_tq(i,j,k_cbase(i,j)) - & + qcf(i,j,k_cbase(i,j)) / & + ( cf(i,j,k_cbase(i,j))*dqcfdz(i,j,k_cbase(i,j)) ) & ) else ! Initialise K_CFF k_cff = k_cbase(i,j) if (k_cff > 1) then - do while ( cff(i,j,k_cff) > sc_cftol & + do while ( cff(i,j,k_cff) > sc_cftol & .and. k_cff > 1) k_cff = k_cff - 1 end do @@ -2914,20 +2913,20 @@ subroutine kmkhz_9c ( & ! No adiabatic QCF gradient so find lowest level, K_CFF, ! with CFF>SC_CFTOL and assume cloud-base within that level !---------------------------------------------------------- - if ( cff(i,j,k_cff) <= sc_cftol .and. & - k_cff < k_cbase(i,j) ) & + if ( cff(i,j,k_cff) <= sc_cftol .and. & + k_cff < k_cbase(i,j) ) & k_cff = k_cff + 1 ! will want to raise K_CFF back up one level unless ! level 1 is cloudy or no sig frozen cloud at all - z_cbase = min( z_cbase, z_top(i,j,k_cff) - & - dzl(i,j,k_cff) & + z_cbase = min( z_cbase, z_top(i,j,k_cff) - & + dzl(i,j,k_cff) & * cff(i,j,k_cff)/cf(i,j,k_cff) ) end if !------------------------------------------------------ ! use cloud-base as seen by cloud scheme as lower limit ! and base of level NTDSC+1 as upper limit !------------------------------------------------------ - z_cbase = min( z_uv(i,j,ntdsc(i,j)+1), & + z_cbase = min( z_uv(i,j,ntdsc(i,j)+1), & max( z_cf_base(i,j) , z_cbase) ) zc_dsc(i,j) = z_ctop(i,j) - z_cbase @@ -2977,9 +2976,9 @@ subroutine kmkhz_9c ( & cf_for_wb(i) = zero z_cbase = zh(i,j)-zc(i,j) zdsc_cbase = zhsc(i,j)-zc_dsc(i,j) - if ( z_tq(i,j,k) <= zh(i,j) .and. & + if ( z_tq(i,j,k) <= zh(i,j) .and. & z_tq(i,j,k) >= z_cbase) cf_for_wb(i) = cf_sml(i,j) - if ( z_tq(i,j,k) <= zhsc(i,j) .and. & + if ( z_tq(i,j,k) <= zhsc(i,j) .and. & z_tq(i,j,k) >= zdsc_cbase) cf_for_wb(i) = cf_dsc(i,j) end do @@ -2996,20 +2995,20 @@ subroutine kmkhz_9c ( & ! This is integrated in EXCF_NL, iterating the K profiles. ! Here the relevant integrated DB/DZ factors are calculated !---------------------------------------------------------- - db_ga_dry(i,j,k) = - g * & + db_ga_dry(i,j,k) = - g * & ( btm(i,j,k-1)*dsl_ga + bqm(i,j,k-1)*dqw_ga ) - db_noga_dry(i,j,k) = - g * & + db_noga_dry(i,j,k) = - g * & ( btm(i,j,k-1)*dsl + bqm(i,j,k-1)*dqw ) - db_ga_cld(i,j,k) = - g * & + db_ga_cld(i,j,k) = - g * & ( btm_cld(i,j,k-1)*dsl_ga + bqm_cld(i,j,k-1)*dqw_ga ) - db_noga_cld(i,j,k) = - g * & + db_noga_cld(i,j,k) = - g * & ( btm_cld(i,j,k-1)*dsl + bqm_cld(i,j,k-1)*dqw ) !------------------------------------------------------- ! Weight cloud layer factors with cloud fraction !------------------------------------------------------- - db_ga_cld(i,j,k) = db_ga_dry(i,j,k)*(one-cf_for_wb(i)) + & + db_ga_cld(i,j,k) = db_ga_dry(i,j,k)*(one-cf_for_wb(i)) + & db_ga_cld(i,j,k)*cf_for_wb(i) - db_noga_cld(i,j,k) = db_noga_dry(i,j,k)*(one-cf_for_wb(i)) + & + db_noga_cld(i,j,k) = db_noga_dry(i,j,k)*(one-cf_for_wb(i)) + & db_noga_cld(i,j,k)*cf_for_wb(i) end do end do @@ -3055,16 +3054,16 @@ subroutine kmkhz_9c ( & do i = pdims%i_start, pdims%i_end ! use mixed-layer average of buoyancy parameters - bflux_surf(i,j) = one_half * g * ( & - (btm(i,j,1)+btm(i,j,ntml(i,j)))*ftl(i,j,1) + & + bflux_surf(i,j) = one_half * g * ( & + (btm(i,j,1)+btm(i,j,ntml(i,j)))*ftl(i,j,1) + & (bqm(i,j,1)+bqm(i,j,ntml(i,j)))*fqw(i,j,1) ) if ( bflux_surf(i,j) > zero ) then - bflux_surf_sat(i,j) = one_half * g * ( & - (btm_cld(i,j,1)+btm_cld(i,j,ntml(i,j)))*ftl(i,j,1) + & + bflux_surf_sat(i,j) = one_half * g * ( & + (btm_cld(i,j,1)+btm_cld(i,j,ntml(i,j)))*ftl(i,j,1) + & (bqm_cld(i,j,1)+bqm_cld(i,j,ntml(i,j)))*fqw(i,j,1) ) - if ( coupled(i,j) ) bflux_surf_sat(i,j) = one_half * g * ( & - (btm_cld(i,j,1)+btm_cld(i,j,ntdsc(i,j)))*ftl(i,j,1) + & + if ( coupled(i,j) ) bflux_surf_sat(i,j) = one_half * g * ( & + (btm_cld(i,j,1)+btm_cld(i,j,ntdsc(i,j)))*ftl(i,j,1) + & (bqm_cld(i,j,1)+bqm_cld(i,j,ntdsc(i,j)))*fqw(i,j,1) ) else bflux_surf_sat(i,j) = zero @@ -3085,32 +3084,32 @@ subroutine kmkhz_9c ( & do k = 1, bl_levels do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) if ( k <= ntml(i,j)+1 ) then - z_cld(i,j) = z_cld(i,j) + & - cf(i,j,k) * one_half * dzl(i,j,k) + & - min( cfl(i,j,k) * one_half * dzl(i,j,k) , & + z_cld(i,j) = z_cld(i,j) + & + cf(i,j,k) * one_half * dzl(i,j,k) + & + min( cfl(i,j,k) * one_half * dzl(i,j,k) , & qcl(i,j,k) / dqcldz(i,j,k) ) if ( dqcfdz(i,j,k) > zero) then - z_cld(i,j) = z_cld(i,j) + & - min( cff(i,j,k) * one_half * dzl(i,j,k) , & + z_cld(i,j) = z_cld(i,j) + & + min( cff(i,j,k) * one_half * dzl(i,j,k) , & qcf(i,j,k) / dqcfdz(i,j,k) ) else z_cld(i,j) = z_cld(i,j) + cff(i,j,k) * one_half * dzl(i,j,k) end if end if - if ( dsc(i,j) .and. k <= ntdsc(i,j)+1 .and. & - ( coupled(i,j) .or. & + if ( dsc(i,j) .and. k <= ntdsc(i,j)+1 .and. & + ( coupled(i,j) .or. & z_top(i,j,k) >= zhsc(i,j)-zc_dsc(i,j) ) ) then - z_cld_dsc(i,j) = z_cld_dsc(i,j) + & - cf(i,j,k) * one_half * dzl(i,j,k) + & - min( cfl(i,j,k) * one_half * dzl(i,j,k) , & + z_cld_dsc(i,j) = z_cld_dsc(i,j) + & + cf(i,j,k) * one_half * dzl(i,j,k) + & + min( cfl(i,j,k) * one_half * dzl(i,j,k) , & qcl(i,j,k) / dqcldz(i,j,k) ) if ( dqcfdz(i,j,k) > zero) then - z_cld_dsc(i,j) = z_cld_dsc(i,j) + & - min( cff(i,j,k) * one_half * dzl(i,j,k) , & + z_cld_dsc(i,j) = z_cld_dsc(i,j) + & + min( cff(i,j,k) * one_half * dzl(i,j,k) , & qcf(i,j,k) / dqcfdz(i,j,k) ) else - z_cld_dsc(i,j) = z_cld_dsc(i,j) + & + z_cld_dsc(i,j) = z_cld_dsc(i,j) + & cff(i,j,k) * one_half * dzl(i,j,k) end if end if @@ -3168,7 +3167,7 @@ subroutine kmkhz_9c ( & dqcf = - cff_ml*qcf_ic_top(i,j) db_disc = g * ( btm(i,j,km)*dsl + bqm(i,j,km)*dqw + & - (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & + (lcrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcl + & (lsrcp*btm(i,j,km) - etar*bqm(i,j,km)) * dqcf ) if ( db_disc > 0.03_r_bl ) then @@ -3406,8 +3405,8 @@ subroutine kmkhz_9c ( & br_fback_dsc(i,j) = min( one, 10.0_r_bl*d_siems_dsc(i,j) ) if ( entr_enhance_by_cu == Buoyrev_feedback & - .and. cumulus(i,j) & - .and. d_siems_dsc(i,j) < 0.1_r_bl & + .and. cumulus(i,j) & + .and. d_siems_dsc(i,j) < 0.1_r_bl & .and. d_siems_dsc(i,j) > rbl_eps ) then ! Assume mixing from cumulus can enhance the ! buoyancy reversal feedback in regime 0 zero ) then !----------------------------------------------------------------- @@ -3970,16 +3969,16 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------- !..linearly interpolate vertical velocity to ZH if ( zh(i,j) >= z_tq(i,j,k) ) then - w_ls(i,j) = w(i,j,k) + ( w(i,j,k+1) - w(i,j,k) ) & + w_ls(i,j) = w(i,j,k) + ( w(i,j,k+1) - w(i,j,k) ) & * (zh(i,j)-z_tq(i,j,k)) * rdz(i,j,k+1) else - w_ls(i,j) = w(i,j,k) + ( w(i,j,k) - w(i,j,k-1) ) & + w_ls(i,j) = w(i,j,k) + ( w(i,j,k) - w(i,j,k-1) ) & * (zh(i,j)-z_tq(i,j,k)) * rdz(i,j,k) end if w_ls(i,j) = min ( w_ls(i,j), zero ) ! only interested in subsidence - zh_np1(i,j) = zh(i,j) + & + zh_np1(i,j) = zh(i,j) + & timestep * ( we_parm(i,j) + w_ls(i,j) ) zh_np1(i,j) = max( zh_np1(i,j), z_uv(i,j,k-1) ) if ( zh_np1(i,j) > z_top(i,j,k+1) ) then @@ -3987,7 +3986,7 @@ subroutine kmkhz_9c ( & ! because the inversion cannot rise more than one level ! in a timestep. zh_np1(i,j) = z_top(i,j,k+1) - we_parm(i,j) = & + we_parm(i,j) = & (z_top(i,j,k+1) - zh(i,j))/timestep - w_ls(i,j) end if !----------------------------------------------------------------- @@ -4005,18 +4004,18 @@ subroutine kmkhz_9c ( & ! T_FRAC is fraction of timestep inversion is above ! the entrainment flux grid-level (at Z_UV(K)) - t_frac(i,j) = (zh_np1(i,j)-z_uv(i,j,k)) / & + t_frac(i,j) = (zh_np1(i,j)-z_uv(i,j,k)) / & (zh_np1(i,j)-zh(i,j)) ! ZH_FRAC is the timestep-average fraction of mixed layer ! air in the inversion grid-level, level NTML+1 - zh_frac(i,j) = one_half*t_frac(i,j)*(zh_np1(i,j)-z_uv(i,j,k) ) & + zh_frac(i,j) = one_half*t_frac(i,j)*(zh_np1(i,j)-z_uv(i,j,k) ) & / dzl(i,j,k) else if ( zh_np1(i,j) >= z_uv(i,j,ntml(i,j)+1) ) then ! ZH always between half-levels NTML+1 and NTML+2 t_frac(i,j) = one - zh_frac(i,j) = ( one_half*(zh(i,j)+zh_np1(i,j)) - z_uv(i,j,k) ) & + zh_frac(i,j) = ( one_half*(zh(i,j)+zh_np1(i,j)) - z_uv(i,j,k) ) & / dzl(i,j,k) else @@ -4071,7 +4070,7 @@ subroutine kmkhz_9c ( & tothf_zh(i,j) = - we_rho(i,j)*dsl_sml(i,j) + ft_nt_zh(i,j) ! Linearly interpolate to entrainment flux grid-level - tothf_efl = ft_nt(i,j,1) + ftl(i,j,1) + & + tothf_efl = ft_nt(i,j,1) + ftl(i,j,1) + & ( tothf_zh(i,j)-ft_nt(i,j,1)-ftl(i,j,1) )*zrzi(i,j) ! Ensure total heat flux gradient in inversion grid-level is ! consistent with inversion rising (ie. implies cooling in @@ -4080,29 +4079,29 @@ subroutine kmkhz_9c ( & ml_tend = -( tothf_zh(i,j)-ft_nt(i,j,1)-ftl(i,j,1) ) / zh(i,j) fa_tend = zero - if ( k+1 <= bl_levels ) & - fa_tend = - ( ft_nt(i,j,k+2) - ft_nt(i,j,k+1) ) & + if ( k+1 <= bl_levels ) & + fa_tend = - ( ft_nt(i,j,k+2) - ft_nt(i,j,k+1) ) & / dzl(i,j,k+1) - inv_tend = zh_frac(i,j) * ml_tend & + inv_tend = zh_frac(i,j) * ml_tend & + (one-zh_frac(i,j)) * fa_tend if (we_parm(i,j)+w_ls(i,j) >= zero) then ! Inversion moving up so inversion level should cool ! Ensure it does cool relative to ML - tothf_efl = min( tothf_efl, & + tothf_efl = min( tothf_efl, & ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) ! Ensure inversion level won't end up colder than ! NTML by end of timestep. ! Set INV_TEND to max allowable cooling rate, also ! allowing for change in ML_TEND arising from this change ! to TOTHF_EFL: - inv_tend = (sl(i,j,k-1)-sl(i,j,k))/timestep & + inv_tend = (sl(i,j,k-1)-sl(i,j,k))/timestep & + (ft_nt(i,j,1)+ftl(i,j,1))/z_uv(i,j,k) - tothf_efl = max( tothf_efl, & - (ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + tothf_efl = max( tothf_efl, & + (ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) else ! WE_PARM+W_LS < 0 ! Ensure inversion level does warm relative to ML - tothf_efl = max( tothf_efl, & + tothf_efl = max( tothf_efl, & ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) end if ! Turbulent entrainment flux is then the residual of the total @@ -4115,30 +4114,30 @@ subroutine kmkhz_9c ( & rhokh(i,j,k) = max( rhokh(i,j,k), rhokh_surf_ent(i,j) ) if (res_inv(i,j) == 1) then - Prandtl = min( rhokm(i,j,k)/(rbl_eps+rhokh_surf_ent(i,j)), & + Prandtl = min( rhokm(i,j,k)/(rbl_eps+rhokh_surf_ent(i,j)), & pr_max ) if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then ! need velocity scale for TKE diagnostic - w_m = ( v_s(i,j)*v_s(i,j)*v_s(i,j) + & + w_m = ( v_s(i,j)*v_s(i,j)*v_s(i,j) + & c_ws * zh(i,j) * fb_surf(i,j) ) ** one_third end if if (bl_res_inv == cosine_inv_flux) then - svl_lapse_rho = (svl(i,j,k)-svl(i,j,k-1)) / & + svl_lapse_rho = (svl(i,j,k)-svl(i,j,k-1)) / & ( (z_tq(i,j,k)-z_tq(i,j,k-1))*rho_mix(i,j,k) ) kl=k+1 - do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & + do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & kl <= bl_levels ) - recip_svl_lapse = (z_tq(i,j,kl)-z_tq(i,j,kl-1))/ & + recip_svl_lapse = (z_tq(i,j,kl)-z_tq(i,j,kl-1))/ & max( 0.01_r_bl, svl(i,j,kl)-svl(i,j,kl-1) ) - rhok_inv = rhokh_surf_ent(i,j) * svl_lapse_rho * & - rho_mix(i,j,kl) * recip_svl_lapse * & + rhok_inv = rhokh_surf_ent(i,j) * svl_lapse_rho * & + rho_mix(i,j,kl) * recip_svl_lapse * & cos(one_half*pi*(z_uv(i,j,kl)-zh(i,j))/dzh(i,j)) rhok_inv = min( rhok_inv, 1000.0_r_bl ) rhokh(i,j,kl) = max( rhokh(i,j,kl), rhok_inv ) ! rescale for KM on staggered grid - rhok_inv = Prandtl * rhok_inv & - * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & + rhok_inv = Prandtl * rhok_inv & + * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then @@ -4148,45 +4147,45 @@ subroutine kmkhz_9c ( & kl=kl+1 end do else if (bl_res_inv == target_inv_profile) then - svl_lapse = (svl(i,j,k)-svl(i,j,k-1)) / & + svl_lapse = (svl(i,j,k)-svl(i,j,k-1)) / & ( (z_tq(i,j,k)-z_tq(i,j,k-1)) ) kp=k+1 ! kp marks the lowest level above the inversion - do while ( z_uv(i,j,kp) < zh(i,j)+dzh(i,j) .and. & + do while ( z_uv(i,j,kp) < zh(i,j)+dzh(i,j) .and. & kp <= bl_levels ) kp=kp+1 end do svl_flux(k) = - rhokh_surf_ent(i,j) * svl_lapse kl=k+1 - do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & + do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & kl <= bl_levels ) ! assume a linear target svl profile within inversion - svl_target = svl(i,j,k-1) + (svl(i,j,kp)-svl(i,j,k-1)) * & + svl_target = svl(i,j,k-1) + (svl(i,j,kp)-svl(i,j,k-1)) * & (z_uv(i,j,kl)-zh(i,j)) / dzh(i,j) rho_dz = rho_mix_tq(i,j,kl) * dzl(i,j,kl) - svl_flux(kl) = svl_flux(kl-1) - & + svl_flux(kl) = svl_flux(kl-1) - & (svl_target-svl(i,j,kl))*rho_dz/timestep kl=kl+1 end do ! linearly extrapolate flux to inversion top - svl_flux(kp)=svl_flux(kp-1) + (svl_flux(kp-1)-svl_flux(kp-2))* & + svl_flux(kp)=svl_flux(kp-1) + (svl_flux(kp-1)-svl_flux(kp-2))* & (zh(i,j)+dzh(i,j)-z_uv(i,j,kp-1))*rdz(i,j,kp-1) kl=k+1 - do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & + do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & kl <= bl_levels ) ! rescale svl_flux so as to have zero flux at the inversion top ! ie so svl_flux(kp)=0 - svl_flux(kl) = svl_flux(k)*( one - & - (svl_flux(kl)-svl_flux(k))/ & + svl_flux(kl) = svl_flux(k)*( one - & + (svl_flux(kl)-svl_flux(k))/ & (svl_flux(kp)-svl_flux(k)) ) - recip_svl_lapse = (z_tq(i,j,kl)-z_tq(i,j,kl-1))/ & + recip_svl_lapse = (z_tq(i,j,kl)-z_tq(i,j,kl-1))/ & max( 0.01_r_bl, svl(i,j,kl)-svl(i,j,kl-1) ) rhok_inv = - svl_flux(kl) * recip_svl_lapse rhok_inv = min( rhok_inv, 1000.0_r_bl ) rhokh(i,j,kl) = max( rhokh(i,j,kl), rhok_inv ) ! rescale for KM on staggered grid - rhok_inv = Prandtl * rhok_inv & - * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & + rhok_inv = Prandtl * rhok_inv & + * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then @@ -4218,10 +4217,10 @@ subroutine kmkhz_9c ( & totqf_zhsc(i,j) = zero k=ntdsc(i,j)+1 - we_dsc_parm(i,j) = rdz(i,j,k)*rhokh_dsct_ent(i,j) & + we_dsc_parm(i,j) = rdz(i,j,k)*rhokh_dsct_ent(i,j) & / rho_mix(i,j,k) - if ( dsc_disc_inv(i,j) == 1 & + if ( dsc_disc_inv(i,j) == 1 & .and. rhokh_dsct_ent(i,j) > zero ) then !----------------------------------------------------------------- @@ -4229,16 +4228,16 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------- !..interpolate vertical velocity to ZH if ( zhsc(i,j) >= z_tq(i,j,k) ) then - w_ls_dsc(i,j) = w(i,j,k) + ( w(i,j,k+1) - w(i,j,k) ) * & + w_ls_dsc(i,j) = w(i,j,k) + ( w(i,j,k+1) - w(i,j,k) ) * & (zhsc(i,j)-z_tq(i,j,k)) * rdz(i,j,k+1) else - w_ls_dsc(i,j) = w(i,j,k) + ( w(i,j,k) - w(i,j,k-1) ) * & + w_ls_dsc(i,j) = w(i,j,k) + ( w(i,j,k) - w(i,j,k-1) ) * & (zhsc(i,j)-z_tq(i,j,k)) * rdz(i,j,k) end if w_ls_dsc(i,j) = min ( w_ls_dsc(i,j), zero ) ! only interested in subsidence - zhsc_np1(i,j) = zhsc(i,j) + & + zhsc_np1(i,j) = zhsc(i,j) + & timestep * ( we_dsc_parm(i,j) + w_ls_dsc(i,j) ) zhsc_np1(i,j) = max( zhsc_np1(i,j), z_uv(i,j,k-1) ) if ( zhsc_np1(i,j) > z_top(i,j,k+1) ) then @@ -4246,7 +4245,7 @@ subroutine kmkhz_9c ( & ! because the inversion cannot rise more than one level ! in a timestep. zhsc_np1(i,j) = z_top(i,j,k+1) - we_dsc_parm(i,j) = & + we_dsc_parm(i,j) = & (z_top(i,j,k+1) - zhsc(i,j))/timestep - w_ls_dsc(i,j) end if !----------------------------------------------------------------- @@ -4259,17 +4258,17 @@ subroutine kmkhz_9c ( & ntdsc(i,j) = ntdsc(i,j) + 1 k = ntdsc(i,j)+1 dsc_disc_inv(i,j) = 2 - t_frac_dsc(i,j) = (zhsc_np1(i,j)-z_uv(i,j,k)) / & + t_frac_dsc(i,j) = (zhsc_np1(i,j)-z_uv(i,j,k)) / & (zhsc_np1(i,j)-zhsc(i,j)) - zhsc_frac(i,j) = one_half*t_frac_dsc(i,j)* & + zhsc_frac(i,j) = one_half*t_frac_dsc(i,j)* & ( zhsc_np1(i,j)-z_uv(i,j,k) )/ dzl(i,j,k) else if ( zhsc_np1(i,j) > z_uv(i,j,ntdsc(i,j)+1) ) then ! ZHSC always between half-levels NTDSC+1 and NTDSC+2 t_frac_dsc(i,j) = one - zhsc_frac(i,j) = ( one_half*(zhsc(i,j)+zhsc_np1(i,j)) & + zhsc_frac(i,j) = ( one_half*(zhsc(i,j)+zhsc_np1(i,j)) & - z_uv(i,j,k) )/ dzl(i,j,k) else @@ -4289,7 +4288,7 @@ subroutine kmkhz_9c ( & we_rho_dsc(i,j) = rho_mix(i,j,k) * we_dsc_parm(i,j) ! for z'/z_i' assume height of DSC base is fixed in time - zrzi_dsc(i,j) =( z_uv(i,j,k)-(zhsc(i,j)-dscdepth(i,j)) ) & + zrzi_dsc(i,j) =( z_uv(i,j,k)-(zhsc(i,j)-dscdepth(i,j)) ) & /( dscdepth(i,j)+one_half*(zhsc_np1(i,j)-zhsc(i,j)) ) end if ! test on DSC_DISC_INV, etc @@ -4315,9 +4314,9 @@ subroutine kmkhz_9c ( & rhokh_top(i,j,k) = zero ! apply entrainment explicitly rhokh(i,j,k) = zero ! " - tothf_zhsc(i,j) = - we_rho_dsc(i,j)*dsl_dsc(i,j) & + tothf_zhsc(i,j) = - we_rho_dsc(i,j)*dsl_dsc(i,j) & + ft_nt_zhsc(i,j) - tothf_efl = ft_nt_dscb(i,j) + & + tothf_efl = ft_nt_dscb(i,j) + & ( tothf_zhsc(i,j)-ft_nt_dscb(i,j) )*zrzi_dsc(i,j) ! Ensure total heat flux gradient in inversion grid-level is ! consistent with inversion rising (implies cooling in @@ -4325,26 +4324,26 @@ subroutine kmkhz_9c ( & ! (implies warming) ml_tend = - ( tothf_zhsc(i,j)-ft_nt_dscb(i,j) )/ dscdepth(i,j) fa_tend = zero - if ( k+1 <= bl_levels ) & - fa_tend = - ( ft_nt(i,j,k+2) - ft_nt(i,j,k+1) ) & + if ( k+1 <= bl_levels ) & + fa_tend = - ( ft_nt(i,j,k+2) - ft_nt(i,j,k+1) ) & / dzl(i,j,k+1) - inv_tend = zhsc_frac(i,j) * ml_tend & + inv_tend = zhsc_frac(i,j) * ml_tend & + (one-zhsc_frac(i,j)) * fa_tend if (we_dsc_parm(i,j)+w_ls_dsc(i,j) >= zero) then ! Inversion moving up so inversion level should cool ! Ensure it does cool relative to ML - tothf_efl = min( tothf_efl, & + tothf_efl = min( tothf_efl, & ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) ! Ensure inversion level won't end up colder than ! NTDSC by end of timestep. - inv_tend = (sl(i,j,k-1)-sl(i,j,k))/timestep & + inv_tend = (sl(i,j,k-1)-sl(i,j,k))/timestep & + ft_nt_dscb(i,j)/dscdepth(i,j) - tothf_efl = max( tothf_efl, & - (ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + tothf_efl = max( tothf_efl, & + (ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & /(one+ dzl(i,j,k)/dscdepth(i,j)) ) else ! WE_DSC_PARM+W_LS_DSC < 0 - tothf_efl = max( tothf_efl, & + tothf_efl = max( tothf_efl, & ft_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) end if ! Turbulent entrainment flux is then the residual of the total @@ -4382,8 +4381,8 @@ subroutine kmkhz_9c ( & ! within the DSC layer ! Interpolate non-turb flux to base ! of DSC layer: - fq_nt_dscb(i,j) = fq_nt(i,j,k-1) + & - (fq_nt(i,j,k)-fq_nt(i,j,k-1)) & + fq_nt_dscb(i,j) = fq_nt(i,j,k-1) + & + (fq_nt(i,j,k)-fq_nt(i,j,k-1)) & *(zdsc_base(i,j)-z_uv(i,j,k-1))/dzl(i,j,k-1) end if end do @@ -4402,8 +4401,8 @@ subroutine kmkhz_9c ( & ! within the DSC layer ! Interpolate non-turb flux to base ! of DSC layer: - wtrac_bl(i_wt)%fq_nt_dscb(i,j) = wtrac_bl(i_wt)%fq_nt(i,j,k-1) + & - ( wtrac_bl(i_wt)%fq_nt(i,j,k)- wtrac_bl(i_wt)%fq_nt(i,j,k-1)) & + wtrac_bl(i_wt)%fq_nt_dscb(i,j) = wtrac_bl(i_wt)%fq_nt(i,j,k-1) + & + ( wtrac_bl(i_wt)%fq_nt(i,j,k)- wtrac_bl(i_wt)%fq_nt(i,j,k-1)) & *(zdsc_base(i,j)-z_uv(i,j,k-1))/dzl(i,j,k-1) end if end do @@ -4430,7 +4429,7 @@ subroutine kmkhz_9c ( & ! inversion height totqf_zh(i,j) = - we_rho(i,j)*dqw_sml(i,j) + fq_nt_zh(i,j) ! Interpolate to entrainment flux-level below - totqf_efl = fq_nt(i,j,1) + fqw(i,j,1) + zrzi(i,j) * & + totqf_efl = fq_nt(i,j,1) + fqw(i,j,1) + zrzi(i,j) * & ( totqf_zh(i,j) - fq_nt(i,j,1) - fqw(i,j,1) ) ! Need to ensure the total QW flux gradient in inversion ! grid-level is consistent with inversion rising or falling. @@ -4440,10 +4439,10 @@ subroutine kmkhz_9c ( & ! If QW(K) is moister than ML then want opposite tendencies. ml_tend = - ( totqf_zh(i,j)-fq_nt(i,j,1)-fqw(i,j,1) ) /zh(i,j) fa_tend = zero - if ( k+1 <= bl_levels ) & - fa_tend = - ( fq_nt(i,j,k+2)-fq_nt(i,j,k+1) ) & + if ( k+1 <= bl_levels ) & + fa_tend = - ( fq_nt(i,j,k+2)-fq_nt(i,j,k+1) ) & / dzl(i,j,k+1) - inv_tend = zh_frac(i,j) * ml_tend & + inv_tend = zh_frac(i,j) * ml_tend & + (one-zh_frac(i,j)) * fa_tend if (we_parm(i,j)+w_ls(i,j) >= zero) then @@ -4459,10 +4458,10 @@ subroutine kmkhz_9c ( & if ( moisten(i,j) ) then ! Ensure inversion level does moisten relative to ML - if (l_wtrac .and. totqf_efl < (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & + if (l_wtrac .and. totqf_efl < (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & totqf_efl_meth1(i,j) = 1 ! Store method - totqf_efl = max( totqf_efl, & + totqf_efl = max( totqf_efl, & fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) if (we_parm(i,j)+w_ls(i,j) >= zero) then ! Ensure inversion level won't end up more moist than @@ -4470,42 +4469,42 @@ subroutine kmkhz_9c ( & ! Set INV_TEND to max allowable moistening rate, also ! allowing for change in ML_TEND arising from this change ! to TOTQF_EFL: - inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & + inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & + (fq_nt(i,j,1)+fqw(i,j,1))/z_uv(i,j,k) - if (l_wtrac .and. totqf_efl > & - ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) ) & + if (l_wtrac .and. totqf_efl > & + ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) ) & totqf_efl_meth2(i,j) = 1 ! Store method - totqf_efl = min( totqf_efl, & - (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + totqf_efl = min( totqf_efl, & + (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) end if else - if (l_wtrac .and. totqf_efl > (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & + if (l_wtrac .and. totqf_efl > (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & totqf_efl_meth1(i,j) = 1 ! Store method - totqf_efl = min( totqf_efl, & + totqf_efl = min( totqf_efl, & fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) if (we_parm(i,j)+w_ls(i,j) >= zero) then ! Ensure inversion level won't end up drier than ! NTML by end of timestep. ! Set INV_TEND to max allowable drying rate: - inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & + inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & + (fq_nt(i,j,1)+fqw(i,j,1))/z_uv(i,j,k) - if (l_wtrac .and. totqf_efl < & - ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) ) & + if (l_wtrac .and. totqf_efl < & + ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) ) & totqf_efl_meth2(i,j) = 1 ! Store method - totqf_efl = max( totqf_efl, & - (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + totqf_efl = max( totqf_efl, & + (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & /(one+ dzl(i,j,k)/z_uv(i,j,k)) ) end if end if - fqw(i,j,k) = t_frac(i,j) * & + fqw(i,j,k) = t_frac(i,j) * & ( totqf_efl - fq_nt(i,j,k) ) end if @@ -4553,18 +4552,18 @@ subroutine kmkhz_9c ( & k = ntdsc(i,j)+1 ! Calculate total (turb+micro) QW flux at subgrid inversion - totqf_zhsc(i,j) = - we_rho_dsc(i,j)*dqw_dsc(i,j) & + totqf_zhsc(i,j) = - we_rho_dsc(i,j)*dqw_dsc(i,j) & + fq_nt_zhsc(i,j) ! Interpolate to entrainment flux-level - totqf_efl = fq_nt_dscb(i,j) + & + totqf_efl = fq_nt_dscb(i,j) + & ( totqf_zhsc(i,j) - fq_nt_dscb(i,j) )*zrzi_dsc(i,j) ml_tend = - ( totqf_zhsc(i,j)-fq_nt_dscb(i,j) )/dscdepth(i,j) fa_tend = zero - if ( k+1 <= bl_levels ) & - fa_tend = - ( fq_nt(i,j,k+2)-fq_nt(i,j,k+1) ) & + if ( k+1 <= bl_levels ) & + fa_tend = - ( fq_nt(i,j,k+2)-fq_nt(i,j,k+1) ) & / dzl(i,j,k+1) - inv_tend = zhsc_frac(i,j) * ml_tend & + inv_tend = zhsc_frac(i,j) * ml_tend & + (one-zhsc_frac(i,j)) * fa_tend if (we_dsc_parm(i,j)+w_ls_dsc(i,j) >= zero) then @@ -4579,46 +4578,46 @@ subroutine kmkhz_9c ( & if ( moisten(i,j) ) then - if (l_wtrac .and. (totqf_efl < fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & + if (l_wtrac .and. (totqf_efl < fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & totqf_efl_meth1(i,j) = 1 ! Store method - totqf_efl = max( totqf_efl, & + totqf_efl = max( totqf_efl, & fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) if (we_dsc_parm(i,j)+w_ls_dsc(i,j) >= zero) then ! Ensure inversion level won't end up more moist than ! NTDSC by end of timestep. - inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & + inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & + fq_nt_dscb(i,j)/dscdepth(i,j) - if (l_wtrac .and. totqf_efl > & - ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/dscdepth(i,j)) ) ) & + if (l_wtrac .and. totqf_efl > & + ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/dscdepth(i,j)) ) ) & totqf_efl_meth2(i,j) = 1 ! Store method - totqf_efl = min( totqf_efl, & - (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + totqf_efl = min( totqf_efl, & + (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & /(one+ dzl(i,j,k)/dscdepth(i,j)) ) end if else - if (l_wtrac .and. totqf_efl > (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & + if (l_wtrac .and. totqf_efl > (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) ) & totqf_efl_meth1(i,j) = 1 ! Store method - totqf_efl = min( totqf_efl, & + totqf_efl = min( totqf_efl, & fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k) ) if (we_dsc_parm(i,j)+w_ls_dsc(i,j) >= zero) then ! Ensure inversion level won't end up drier than ! NTDSC by end of timestep. ! Set INV_TEND to max allowable drying rate: - inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & + inv_tend = (qw(i,j,k-1)-qw(i,j,k))/timestep & + fq_nt_dscb(i,j)/dscdepth(i,j) - if (l_wtrac .and. totqf_efl < & - ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & - /(one+ dzl(i,j,k)/dscdepth(i,j))) ) & + if (l_wtrac .and. totqf_efl < & + ( (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + /(one+ dzl(i,j,k)/dscdepth(i,j))) ) & totqf_efl_meth2(i,j) = 1 ! Store method - totqf_efl = max( totqf_efl, & - (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & + totqf_efl = max( totqf_efl, & + (fq_nt(i,j,k+1)+inv_tend*dzl(i,j,k)) & /(one+ dzl(i,j,k)/dscdepth(i,j)) ) end if end if @@ -4640,7 +4639,7 @@ subroutine kmkhz_9c ( & end if ! l_wtrac !$OMP PARALLEL DEFAULT(SHARED) & -!$OMP private (i, k, kp, w_var_inv, weight, tke_nl_rh, delta_tke, & +!$OMP private (i, k, kp, w_var_inv, weight, tke_nl_rh, delta_tke, & !$OMP w_s_ent, w_s_cubed, w_m, wstar3, w_h) !----------------------------------------------------------------------- ! Estimate turbulent w-variance scale at discontinuous inversions @@ -4676,9 +4675,9 @@ subroutine kmkhz_9c ( & w_var_inv = 2.0_r_bl * (ftl(i,j,k)/rho_mix(i,j,k)) / dsl_sml(i,j) w_var_inv = w_var_inv * w_var_inv * rho_mix(i,j,k) - weight = ( z_uv(i,j,k) - z_tq(i,j,k-1) ) & + weight = ( z_uv(i,j,k) - z_tq(i,j,k-1) ) & / ( z_tq(i,j,k) - z_tq(i,j,k-1) ) - tke_nl_rh = (one-weight) * tke_nl(i,j,k) & + tke_nl_rh = (one-weight) * tke_nl(i,j,k) & + weight * tke_nl(i,j,kp) delta_tke = w_var_inv - tke_nl_rh @@ -4697,9 +4696,9 @@ subroutine kmkhz_9c ( & w_var_inv = 2.0_r_bl * (ftl(i,j,k)/rho_mix(i,j,k)) / dsl_dsc(i,j) w_var_inv = w_var_inv * w_var_inv * rho_mix(i,j,k) - weight = ( z_uv(i,j,k) - z_tq(i,j,k-1) ) & + weight = ( z_uv(i,j,k) - z_tq(i,j,k-1) ) & / ( z_tq(i,j,k) - z_tq(i,j,k-1) ) - tke_nl_rh = (one-weight) * tke_nl(i,j,k) & + tke_nl_rh = (one-weight) * tke_nl(i,j,k) & + weight * tke_nl(i,j,kp) delta_tke = w_var_inv - tke_nl_rh @@ -4753,10 +4752,10 @@ subroutine kmkhz_9c ( & if ( t_frac(i,j) > zero ) then w_s_ent = zero k = ntml(i,j) - if ( abs( dsl_sml(i,j) ) >= rbl_eps ) w_s_ent = & + if ( abs( dsl_sml(i,j) ) >= rbl_eps ) w_s_ent = & min( zero, -sls_inc(i,j,k) * dzl(i,j,k) /dsl_sml(i,j) ) ! Only allow w_e to be reduced to zero! - we_lim(i,j,2) = rho_mix(i,j,k+1) * & + we_lim(i,j,2) = rho_mix(i,j,k+1) * & max( zero, we_parm(i,j) + w_s_ent ) else we_lim(i,j,2) = zero @@ -4767,10 +4766,10 @@ subroutine kmkhz_9c ( & if ( t_frac_dsc(i,j) > zero ) then w_s_ent = zero k = ntdsc(i,j) - if ( abs( dsl_dsc(i,j) ) >= rbl_eps ) w_s_ent = & + if ( abs( dsl_dsc(i,j) ) >= rbl_eps ) w_s_ent = & min( zero, -sls_inc(i,j,k) * dzl(i,j,k) /dsl_dsc(i,j) ) ! Only allow w_e to be reduced to zero! - we_lim_dsc(i,j,2) = rho_mix(i,j,k) * & + we_lim_dsc(i,j,2) = rho_mix(i,j,k) * & max( zero, we_dsc_parm(i,j) + w_s_ent ) else we_lim_dsc(i,j,2) = zero @@ -4791,12 +4790,12 @@ subroutine kmkhz_9c ( & if (flux_grad == Locketal2000) then w_s_cubed = 0.25_r_bl * zh(i,j) * fb_surf(i,j) if (w_s_cubed > zero) then - w_m = & + w_m = & ( w_s_cubed + v_s(i,j) * v_s(i,j) * v_s(i,j) ) ** one_third t1_sd(i,j) = 1.93_r_bl * ftl(i,j,1) / (rhostar_gb(i,j) * w_m) q1_sd(i,j) = 1.93_r_bl * fqw(i,j,1) / (rhostar_gb(i,j) * w_m) - tv1_sd(i,j) = t(i,j,1) * & - ( one + c_virtual*q(i,j,1) - qcl(i,j,1) - qcf(i,j,1) ) * & + tv1_sd(i,j) = t(i,j,1) * & + ( one + c_virtual*q(i,j,1) - qcl(i,j,1) - qcf(i,j,1) ) * & ( bt(i,j,1)*t1_sd(i,j) + bq(i,j,1)*q1_sd(i,j) ) t1_sd(i,j) = max ( zero , t1_sd(i,j) ) q1_sd(i,j) = max ( zero , q1_sd(i,j) ) @@ -4806,7 +4805,7 @@ subroutine kmkhz_9c ( & q1_sd(i,j) = zero end if end if - grad_t_adj(i,j) = min( max_t_grad , & + grad_t_adj(i,j) = min( max_t_grad , & a_grad_adj * t1_sd(i,j) / zh(i,j) ) grad_q_adj(i,j) = zero else if (flux_grad == HoltBov1993) then @@ -4816,7 +4815,7 @@ subroutine kmkhz_9c ( & wstar3 = fb_surf(i,j) * zh(i,j) w_m =( v_s(i,j)**3 + 0.6_r_bl*wstar3 )**one_third - grad_t_adj(i,j) = a_ga_hb93*(wstar3**one_third)*ftl(i,j,1) & + grad_t_adj(i,j) = a_ga_hb93*(wstar3**one_third)*ftl(i,j,1) & / ( rhostar_gb(i,j)*w_m*w_m*zh(i,j) ) ! GRAD_Q_ADJ(I,j) = A_GA_HB93*(WSTAR3**one_third)*FQW(I,j,1) ! / ( RHOSTAR_GB(I,j)*W_M*W_M*ZH(I,j) ) @@ -4829,9 +4828,9 @@ subroutine kmkhz_9c ( & wstar3 = fb_surf(i,j) * zh(i,j) w_h =( ((4.0_r_bl/3.0_r_bl)*v_s(i,j))**3 + wstar3 )**one_third - grad_t_adj(i,j) = a_ga_lw06 * ftl(i,j,1) & + grad_t_adj(i,j) = a_ga_lw06 * ftl(i,j,1) & / ( rhostar_gb(i,j)*w_h*zh(i,j) ) - grad_q_adj(i,j) = a_ga_lw06 * fqw(i,j,1) & + grad_q_adj(i,j) = a_ga_lw06 * fqw(i,j,1) & / ( rhostar_gb(i,j)*w_h*zh(i,j) ) end if end if ! test on UNSTABLE From e78cb307c2836195759e62fe85a25cbcf76c6e0c Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Thu, 19 Feb 2026 12:30:19 +0000 Subject: [PATCH 10/14] update KGOs and part tidy kmkhz9 --- ..._gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +++++----- ...l9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +++++----- ..._gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +++++----- ...l9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 12 ++++----- ...l9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +++++----- ..._chem_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +++++----- ..._chem_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +++++----- ..._gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +++++----- ...l9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +++++----- ..._gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +++++----- ...l9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +++++----- ...l9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +++++----- .../source/boundary_layer/kmkhz_9c.F90 | 27 ++----------------- 13 files changed, 85 insertions(+), 108 deletions(-) diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt index 141f0234e..eb1cb6c58 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D64F66 -Inner product checksum theta = 5192521B -Inner product checksum u = 6B21F69F -Inner product checksum mr1 = 3FCF3673 -Inner product checksum mr2 = 37495274 -Inner product checksum mr3 = 353ACB02 -Inner product checksum mr4 = 36B08827 +Inner product checksum rho = 46D64F61 +Inner product checksum theta = 51925254 +Inner product checksum u = 6B21F41A +Inner product checksum mr1 = 3FCF5340 +Inner product checksum mr2 = 37413DAC +Inner product checksum mr3 = 354AF58C +Inner product checksum mr4 = 36B0E078 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt index d8334b1a1..3378a46d7 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D65C75 -Inner product checksum theta = 5399FF3A -Inner product checksum u = 6B12FB8C -Inner product checksum mr1 = 41CC351A -Inner product checksum mr2 = 396581CA -Inner product checksum mr3 = 37C43D8C -Inner product checksum mr4 = 3941544A +Inner product checksum rho = 48D65C66 +Inner product checksum theta = 5399FF38 +Inner product checksum u = 6B12FCF3 +Inner product checksum mr1 = 41CC36DE +Inner product checksum mr2 = 396751F9 +Inner product checksum mr3 = 37C30FA0 +Inner product checksum mr4 = 3940C2F9 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt index 0d3e762f2..f0f4f3561 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D64FAE -Inner product checksum theta = 51925269 -Inner product checksum u = 6B21E346 -Inner product checksum mr1 = 3FCF77D3 -Inner product checksum mr2 = 372D03C0 -Inner product checksum mr3 = 354B09BE -Inner product checksum mr4 = 36A3DB02 +Inner product checksum rho = 46D64F93 +Inner product checksum theta = 5192520C +Inner product checksum u = 6B2215EA +Inner product checksum mr1 = 3FCF5A4F +Inner product checksum mr2 = 373376CC +Inner product checksum mr3 = 3537BC54 +Inner product checksum mr4 = 36A04B09 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt index c56daf2ff..c05c62c97 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D65C6C +Inner product checksum rho = 48D65C63 Inner product checksum theta = 5399FF3A -Inner product checksum u = 6B12FBC9 -Inner product checksum mr1 = 41CC35DA -Inner product checksum mr2 = 3968126C -Inner product checksum mr3 = 37C3C072 -Inner product checksum mr4 = 39415E58 +Inner product checksum u = 6B12FC74 +Inner product checksum mr1 = 41CC36C0 +Inner product checksum mr2 = 3968E9AC +Inner product checksum mr3 = 37CA7F54 +Inner product checksum mr4 = 39423474 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt index b16d507ba..08b0b67a8 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D65C6E -Inner product checksum theta = 5399FF39 -Inner product checksum u = 6B12FBEF -Inner product checksum mr1 = 41CC365C -Inner product checksum mr2 = 3968BC3E -Inner product checksum mr3 = 37C2A758 -Inner product checksum mr4 = 39416AD0 +Inner product checksum rho = 48D65C62 +Inner product checksum theta = 5399FF3C +Inner product checksum u = 6B12FB7E +Inner product checksum mr1 = 41CC361C +Inner product checksum mr2 = 3967018E +Inner product checksum mr3 = 37C206E0 +Inner product checksum mr4 = 3941A0AE Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt index d41ff463d..cb8358ada 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D64DB0 -Inner product checksum theta = 51925085 -Inner product checksum u = 6B2279A8 -Inner product checksum mr1 = 3FCF6AF0 -Inner product checksum mr2 = 373D7446 -Inner product checksum mr3 = 35431982 -Inner product checksum mr4 = 369EA8B4 +Inner product checksum rho = 46D64DDB +Inner product checksum theta = 51925096 +Inner product checksum u = 6B226F08 +Inner product checksum mr1 = 3FCF6171 +Inner product checksum mr2 = 372F4B48 +Inner product checksum mr3 = 35417598 +Inner product checksum mr4 = 36AA3336 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt index d8456581a..9abe6e223 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D64E3A -Inner product checksum theta = 5192505F -Inner product checksum u = 6B2295EA -Inner product checksum mr1 = 3FCF4BD8 -Inner product checksum mr2 = 3746F91A -Inner product checksum mr3 = 353302CA -Inner product checksum mr4 = 36A3AF4A +Inner product checksum rho = 46D64E68 +Inner product checksum theta = 51925040 +Inner product checksum u = 6B227D9E +Inner product checksum mr1 = 3FCF647E +Inner product checksum mr2 = 373468AC +Inner product checksum mr3 = 354463AD +Inner product checksum mr4 = 36AA3A3C Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt index aa04a9aec..9e7564e98 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7F7A2 -Inner product checksum theta = 518E7EB6 -Inner product checksum u = 6B17B536 -Inner product checksum mr1 = 3FCBE406 -Inner product checksum mr2 = 37B012D9 -Inner product checksum mr3 = 34AF946F -Inner product checksum mr4 = 36C49E97 +Inner product checksum rho = 46D7F816 +Inner product checksum theta = 518E7E9A +Inner product checksum u = 6B17C073 +Inner product checksum mr1 = 3FCBE1B0 +Inner product checksum mr2 = 37ACDBFC +Inner product checksum mr3 = 34A7BE8D +Inner product checksum mr4 = 36D45222 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt index cc867f8e1..3dbbcec9d 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE0D -Inner product checksum theta = 5392A6C6 -Inner product checksum u = 6A97C1E3 -Inner product checksum mr1 = 41CD05CE -Inner product checksum mr2 = 39CB3EC4 -Inner product checksum mr3 = 37B1B509 -Inner product checksum mr4 = 395DBCC6 +Inner product checksum rho = 48D7FDE0 +Inner product checksum theta = 5392A6BC +Inner product checksum u = 6A97C536 +Inner product checksum mr1 = 41CD039A +Inner product checksum mr2 = 39CC5D22 +Inner product checksum mr3 = 37B60D50 +Inner product checksum mr4 = 3963BC8C Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt index 685142ad3..aadec28ec 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7F6FF -Inner product checksum theta = 518E7E8E -Inner product checksum u = 6B17C7C4 -Inner product checksum mr1 = 3FCBD004 -Inner product checksum mr2 = 37AF0E7E -Inner product checksum mr3 = 34B65364 -Inner product checksum mr4 = 36CA9C03 +Inner product checksum rho = 46D7F73C +Inner product checksum theta = 518E7E8F +Inner product checksum u = 6B17B6A8 +Inner product checksum mr1 = 3FCBE5CC +Inner product checksum mr2 = 37A62110 +Inner product checksum mr3 = 34B87932 +Inner product checksum mr4 = 36C9AADE Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 794b93c78..9705a2d16 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE18 -Inner product checksum theta = 5392A6D2 -Inner product checksum u = 6A97BEAF -Inner product checksum mr1 = 41CD0A10 -Inner product checksum mr2 = 39CBFF25 -Inner product checksum mr3 = 37A95D06 -Inner product checksum mr4 = 396173B8 +Inner product checksum rho = 48D7FE1B +Inner product checksum theta = 5392A6CA +Inner product checksum u = 6A97BCD6 +Inner product checksum mr1 = 41CD11A5 +Inner product checksum mr2 = 39CFA20F +Inner product checksum mr3 = 37A7CF5B +Inner product checksum mr4 = 395C19E0 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 193900c8e..290188c42 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FDEC -Inner product checksum theta = 5392A6BC -Inner product checksum u = 6A97BE00 -Inner product checksum mr1 = 41CD0540 -Inner product checksum mr2 = 39CE0D91 -Inner product checksum mr3 = 37AAED2D -Inner product checksum mr4 = 396377F7 +Inner product checksum rho = 48D7FDFC +Inner product checksum theta = 5392A6E4 +Inner product checksum u = 6A97C1C7 +Inner product checksum mr1 = 41CD0986 +Inner product checksum mr2 = 39CCC4B0 +Inner product checksum mr3 = 37B4BB66 +Inner product checksum mr4 = 395ED71A Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 index 9613c4588..7b66ae884 100644 --- a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 +++ b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 @@ -1179,8 +1179,8 @@ subroutine kmkhz_9c ( & end if ! safe to calculate increments end if - end do - end do + end do !i + end do !k end do !ii !$OMP end do ! Repeat for necessary parts of last 2 loops for water tracers @@ -1272,7 +1272,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do end if -! end do ! This is the most computational expensive loop of the subroutine. The ! following parallelisation obtains lower times than the ones obtained @@ -2681,7 +2680,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT -! end do !----------------------------------------------------------------------- @@ -2703,7 +2701,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT -! end do !$OMP do SCHEDULE(STATIC) @@ -2719,7 +2716,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT -! end do !-------------------------------------------------- @@ -2742,7 +2738,6 @@ subroutine kmkhz_9c ( & end do ! K end do ! I !$OMP end do NOWAIT -! end do ! j !$OMP do SCHEDULE(STATIC) @@ -3071,7 +3066,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do -! No wait removal due to dimension change? !----------------------------------------------------------------------- @@ -3427,7 +3421,6 @@ subroutine kmkhz_9c ( & end do !i end do !ii !$OMP end do -! end do !----------------------------------------------------------------------- @@ -3445,7 +3438,6 @@ subroutine kmkhz_9c ( & df_inv_sml(i,j) = zero end do !$OMP end do -! end do if (l_new_kcloudtop) then @@ -3684,7 +3676,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT -! end do ! Repeat for water tracers @@ -3703,7 +3694,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT - ! end do end do end if @@ -3790,7 +3780,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do - ! end do end do end if @@ -3820,7 +3809,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do - ! end do ! Repeat for water tracers @@ -3918,7 +3906,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT -! end do !----------------------------------------------------------------------- @@ -4294,7 +4281,6 @@ subroutine kmkhz_9c ( & end if ! test on DSC_DISC_INV, etc end do !$OMP end do NOWAIT -! end do !----------------------------------------------------------------------- @@ -4387,7 +4373,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT -! end do ! Repeat for water tracers @@ -4407,7 +4392,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do - ! end do end do end if ! l_wtrac @@ -4712,7 +4696,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do NOWAIT - ! end do end if ! (BL_diag%l_tke) @@ -4741,7 +4724,6 @@ subroutine kmkhz_9c ( & zrzi_dsc_tr(i,j,3) = zero end do ! i !$OMP end do NOWAIT -! end do ! j !$OMP do SCHEDULE(STATIC) @@ -4776,7 +4758,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT -! end do !----------------------------------------------------------------------- @@ -4836,7 +4817,6 @@ subroutine kmkhz_9c ( & end if ! test on UNSTABLE end do !$OMP end do NOWAIT -! end do ! (Note, water tracers assume flux_grad = Locketal2000 so no need to @@ -4871,7 +4851,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT - ! end do end if if (BL_diag%l_cldbase) then @@ -4885,7 +4864,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT - ! end do end if if (BL_diag%l_weparm_dsc) then @@ -4899,7 +4877,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do NOWAIT - ! end do end if if (BL_diag%l_weparm) then From f002d225fefe4c8653593a8fc78e7ec3e5fc6ffd Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Thu, 19 Feb 2026 14:33:08 +0000 Subject: [PATCH 11/14] commit fixes for main conflict merge --- .../source/boundary_layer/kmkhz_9c.F90 | 226 +++++++----------- 1 file changed, 90 insertions(+), 136 deletions(-) diff --git a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 index 95196e06a..117cfba63 100644 --- a/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 +++ b/science/physics_schemes/source/boundary_layer/kmkhz_9c.F90 @@ -1059,7 +1059,6 @@ subroutine kmkhz_9c ( & end do end do - !k = bl_levels do i = ii, min((ii+bl_segment_size)-1,pdims%i_end) z_top(i,j,bl_levels) = z_uv(i,j,bl_levels) + dzl(i,j,bl_levels) end do @@ -1310,10 +1309,10 @@ subroutine kmkhz_9c ( & ! Repeat necessary parts of last loop for water tracer if (l_wtrac) then -!$OMP do SCHEDULE(STATIC) do i_wt = 1, n_wtrac do k = 1, bl_levels kp = k+1 + !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end rho_dz = rho_mix_tq(i,j,k) * dzl(i,j,k) dfmic_wtrac(i,j,k,i_wt) = & @@ -1327,9 +1326,9 @@ subroutine kmkhz_9c ( & wtrac_bl(i_wt)%fq_nt(i,j,kp) = & fmic_wtrac(i,j,kp,i_wt) + fsubs_wtrac(i,j,kp,i_wt) end do ! i + !$OMP end do end do ! k end do ! i_wt -!$OMP end do end if ! l_wtrac !----------------------------------------------------------------------- @@ -2797,7 +2796,6 @@ subroutine kmkhz_9c ( & ! Second DSC layer !----------------------------------------------------------------------- - !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end cloud_base(i,j) = .false. @@ -2816,13 +2814,11 @@ subroutine kmkhz_9c ( & end do !$OMP end do NOWAIT - !------------------------------------------------------------- ! Find cloud-base as seen by cloud scheme, Z_CF_BASE, ! to use as first guess or lower limit and find cloud top. !------------------------------------------------------------- - !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end k_level(i,j) = ntdsc(i,j) @@ -2837,8 +2833,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do NOWAIT - - !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( cf_dsc(i,j) > sc_cftol ) then @@ -2853,12 +2847,10 @@ subroutine kmkhz_9c ( & end do !$OMP end do NOWAIT - !-------------------------------------------------- ! Find lowest level within ML with max CF !-------------------------------------------------- - !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end do k = min(bl_levels,ntdsc(i,j)+p1), 1, -1 @@ -2876,8 +2868,6 @@ subroutine kmkhz_9c ( & end do ! I !$OMP end do NOWAIT - - !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -2935,7 +2925,6 @@ subroutine kmkhz_9c ( & end do !I !$OMP end do - !----------------------------------------------------------------------- ! 6. Calculate buoyancy flux factor used in the diagnosis of decoupling !----------------------------------------------------------------------- @@ -3012,7 +3001,6 @@ subroutine kmkhz_9c ( & ! 7. Calculate inputs for the top of b.l. entrainment parametrization !----------------------------------------------------------------------- - !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end zeta_r_dsc(i,j) = zero @@ -3038,12 +3026,10 @@ subroutine kmkhz_9c ( & end do !$OMP end do - !----------------------------------------------------------------------- ! 7.1 Calculate surface buoyancy flux !----------------------------------------------------------------------- - !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -3766,7 +3752,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do - ! Repeat for water tracers if (l_wtrac) then do i_wt = 1, n_wtrac @@ -3809,7 +3794,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do - ! Repeat for water tracers if (l_wtrac) then do i_wt = 1, n_wtrac @@ -3828,7 +3812,6 @@ subroutine kmkhz_9c ( & !$OMP end do end do end if - else ! not l_use_sml_dsc_fixes @@ -3863,7 +3846,6 @@ subroutine kmkhz_9c ( & ! Repeat for water tracers if (l_wtrac) then do i_wt = 1, n_wtrac - !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end if ( .not. dsc(i,j) .and. dsc_save(i,j) ) then @@ -3879,7 +3861,6 @@ subroutine kmkhz_9c ( & end if end do !$OMP end do - end do end if @@ -4027,7 +4008,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do NOWAIT - !----------------------------------------------------------------------- !..Linearly interpolate between the known total (turb+rad+subs+micro) !..flux at the surface and the parametrized flux at the inversion @@ -4041,7 +4021,6 @@ subroutine kmkhz_9c ( & end if c_tke = 1.33_r_bl/(vkman*c_ws**two_thirds) - !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -4100,107 +4079,89 @@ subroutine kmkhz_9c ( & rhokh(i,j,k) = max( rhokh(i,j,k), rhokh_surf_ent(i,j) ) if (res_inv(i,j) == 1) then - Prandtl = min( rhokm(i,j,k)/(rbl_eps+rhokh_surf_ent(i,j)), & - pr_max ) - if (BL_diag%l_tke .and. var_diags_opt == split_tke_and_inv) then + Prandtl = min( rhokm(i,j,k)/(rbl_eps+rhokh_surf_ent(i,j)), & + pr_max ) + if (BL_diag%l_tke) then ! need velocity scale for TKE diagnostic - w_m = ( v_s(i,j)*v_s(i,j)*v_s(i,j) + & - c_ws * zh(i,j) * fb_surf(i,j) ) ** one_third - end if - ! Turbulent entrainment flux is then the residual of the total - ! flux and the net flux from other processes - ftl(i,j,k) = t_frac(i,j) * ( tothf_efl - ft_nt(i,j,k) ) - else ! not specifying entrainment flux but KH - ! Include entrainment KH in K-profiles, if greater - ! (for COUPLED layers these will be zero) - rhokh_top(i,j,k) = max( rhokh_top(i,j,k), rhokh_top_ent(i,j) ) - rhokh(i,j,k) = max( rhokh(i,j,k), rhokh_surf_ent(i,j) ) - - if (res_inv(i,j) == 1) then - Prandtl = min( rhokm(i,j,k)/(rbl_eps+rhokh_surf_ent(i,j)), & - pr_max ) - if (BL_diag%l_tke) then - ! need velocity scale for TKE diagnostic - w_m = ( v_s(i,j)*v_s(i,j)*v_s(i,j) + & + w_m = ( v_s(i,j)*v_s(i,j)*v_s(i,j) + & c_ws * zh(i,j) * fb_surf(i,j) ) ** one_third - end if + end if - if (bl_res_inv == cosine_inv_flux) then - svl_lapse_rho = (svl(i,j,k)-svl(i,j,k-1)) / & + if (bl_res_inv == cosine_inv_flux) then + svl_lapse_rho = (svl(i,j,k)-svl(i,j,k-1)) / & ( (z_tq(i,j,k)-z_tq(i,j,k-1))*rho_mix(i,j,k) ) - kl=k+1 - do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & - kl <= bl_levels ) - recip_svl_lapse = (z_tq(i,j,kl)-z_tq(i,j,kl-1))/ & - max( 0.01_r_bl, svl(i,j,kl)-svl(i,j,kl-1) ) - rhok_inv = rhokh_surf_ent(i,j) * svl_lapse_rho * & - rho_mix(i,j,kl) * recip_svl_lapse * & - cos(one_half*pi*(z_uv(i,j,kl)-zh(i,j))/dzh(i,j)) - rhok_inv = min( rhok_inv, 1000.0_r_bl ) - rhokh(i,j,kl) = max( rhokh(i,j,kl), rhok_inv ) - ! rescale for KM on staggered grid - rhok_inv = Prandtl * rhok_inv & - * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & - * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) - rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) - if (BL_diag%l_tke) then - ! save Km/timescale for TKE diag, completed in bdy_expl2 - tke_nl(i,j,kl) = max( tke_nl(i,j,kl), rhok_inv*c_tke*w_m/zh(i,j)) - end if - kl=kl+1 - end do - else if (bl_res_inv == target_inv_profile) then - svl_lapse = (svl(i,j,k)-svl(i,j,k-1)) / & - ( (z_tq(i,j,k)-z_tq(i,j,k-1)) ) - kp=k+1 ! kp marks the lowest level above the inversion - do while ( z_uv(i,j,kp) < zh(i,j)+dzh(i,j) .and. & - kp <= bl_levels ) - kp=kp+1 - end do - svl_flux(k) = - rhokh_surf_ent(i,j) * svl_lapse - kl=k+1 - do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & - kl <= bl_levels ) - ! assume a linear target svl profile within inversion - svl_target = svl(i,j,k-1) + (svl(i,j,kp)-svl(i,j,k-1)) * & - (z_uv(i,j,kl)-zh(i,j)) / dzh(i,j) - rho_dz = rho_mix_tq(i,j,kl) * dzl(i,j,kl) - svl_flux(kl) = svl_flux(kl-1) - & - (svl_target-svl(i,j,kl))*rho_dz/timestep - kl=kl+1 - end do - ! linearly extrapolate flux to inversion top - svl_flux(kp)=svl_flux(kp-1) + (svl_flux(kp-1)-svl_flux(kp-2))* & - (zh(i,j)+dzh(i,j)-z_uv(i,j,kp-1))*rdz(i,j,kp-1) - kl=k+1 - do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & - kl <= bl_levels ) - ! rescale svl_flux so as to have zero flux at the inversion top - ! ie so svl_flux(kp)=0 - svl_flux(kl) = svl_flux(k)*( one - & - (svl_flux(kl)-svl_flux(k))/ & - (svl_flux(kp)-svl_flux(k)) ) - recip_svl_lapse = (z_tq(i,j,kl)-z_tq(i,j,kl-1))/ & - max( 0.01_r_bl, svl(i,j,kl)-svl(i,j,kl-1) ) - rhok_inv = - svl_flux(kl) * recip_svl_lapse - - rhok_inv = min( rhok_inv, 1000.0_r_bl ) - rhokh(i,j,kl) = max( rhokh(i,j,kl), rhok_inv ) - ! rescale for KM on staggered grid - rhok_inv = Prandtl * rhok_inv & - * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & - * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) - rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) - if (BL_diag%l_tke) then - ! save Km/timescale for TKE diag, completed in bdy_expl2 - tke_nl(i,j,kl) = max( tke_nl(i,j,kl), rhok_inv*c_tke*w_m/zh(i,j)) - end if - kl=kl+1 - end do - end if ! bl_res_inv option - end if ! res_inv - end if ! test on T_FRAC gt 0 - + kl=k+1 + do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & + kl <= bl_levels ) + recip_svl_lapse = (z_tq(i,j,kl)-z_tq(i,j,kl-1))/ & + max( 0.01_r_bl, svl(i,j,kl)-svl(i,j,kl-1) ) + rhok_inv = rhokh_surf_ent(i,j) * svl_lapse_rho * & + rho_mix(i,j,kl) * recip_svl_lapse * & + cos(one_half*pi*(z_uv(i,j,kl)-zh(i,j))/dzh(i,j)) + rhok_inv = min( rhok_inv, 1000.0_r_bl ) + rhokh(i,j,kl) = max( rhokh(i,j,kl), rhok_inv ) + ! rescale for KM on staggered grid + rhok_inv = Prandtl * rhok_inv & + * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & + * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) + rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) + if (BL_diag%l_tke) then + ! save Km/timescale for TKE diag, completed in bdy_expl2 + tke_nl(i,j,kl) = max( tke_nl(i,j,kl), rhok_inv*c_tke*w_m/zh(i,j)) + end if + kl=kl+1 + end do + else if (bl_res_inv == target_inv_profile) then + svl_lapse = (svl(i,j,k)-svl(i,j,k-1)) / & + ( (z_tq(i,j,k)-z_tq(i,j,k-1)) ) + kp=k+1 ! kp marks the lowest level above the inversion + do while ( z_uv(i,j,kp) < zh(i,j)+dzh(i,j) .and. & + kp <= bl_levels ) + kp=kp+1 + end do + svl_flux(k) = - rhokh_surf_ent(i,j) * svl_lapse + kl=k+1 + do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & + kl <= bl_levels ) + ! assume a linear target svl profile within inversion + svl_target = svl(i,j,k-1) + (svl(i,j,kp)-svl(i,j,k-1)) * & + (z_uv(i,j,kl)-zh(i,j)) / dzh(i,j) + rho_dz = rho_mix_tq(i,j,kl) * dzl(i,j,kl) + svl_flux(kl) = svl_flux(kl-1) - & + (svl_target-svl(i,j,kl))*rho_dz/timestep + kl=kl+1 + end do + ! linearly extrapolate flux to inversion top + svl_flux(kp)=svl_flux(kp-1) + (svl_flux(kp-1)-svl_flux(kp-2))* & + (zh(i,j)+dzh(i,j)-z_uv(i,j,kp-1))*rdz(i,j,kp-1) + kl=k+1 + do while ( z_uv(i,j,kl) < zh(i,j)+dzh(i,j) .and. & + kl <= bl_levels ) + ! rescale svl_flux so as to have zero flux at the inversion top + ! ie so svl_flux(kp)=0 + svl_flux(kl) = svl_flux(k)*( one - & + (svl_flux(kl)-svl_flux(k))/ & + (svl_flux(kp)-svl_flux(k)) ) + recip_svl_lapse = (z_tq(i,j,kl)-z_tq(i,j,kl-1))/ & + max( 0.01_r_bl, svl(i,j,kl)-svl(i,j,kl-1) ) + rhok_inv = - svl_flux(kl) * recip_svl_lapse + + rhok_inv = min( rhok_inv, 1000.0_r_bl ) + rhokh(i,j,kl) = max( rhokh(i,j,kl), rhok_inv ) + ! rescale for KM on staggered grid + rhok_inv = Prandtl * rhok_inv & + * rdz(i,j,kl) * (z_uv(i,j,kl)-z_uv(i,j,kl-1)) & + * rho_wet_tq(i,j,kl-1) / rho_mix(i,j,kl) + rhokm(i,j,kl) = max( rhokm(i,j,kl), rhok_inv ) + if (BL_diag%l_tke) then + ! save Km/timescale for TKE diag, completed in bdy_expl2 + tke_nl(i,j,kl) = max( tke_nl(i,j,kl), rhok_inv*c_tke*w_m/zh(i,j)) + end if + kl=kl+1 + end do + end if ! bl_res_inv option + end if ! res_inv + end if ! test on T_FRAC gt 0 end do !$OMP end do NOWAIT @@ -4507,7 +4468,6 @@ subroutine kmkhz_9c ( & fqw(i,j,k) = t_frac(i,j) * & ( totqf_efl - fq_nt(i,j,k) ) end if - end do !$OMP end do @@ -4740,7 +4700,6 @@ subroutine kmkhz_9c ( & end do ! i !$OMP end do NOWAIT - !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end kent(i,j) = ntml(i,j)+1 @@ -4774,7 +4733,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do NOWAIT - !----------------------------------------------------------------------- ! 12. Update standard deviations and gradient adjustment to use this ! timestep's ZH (code from SF_EXCH) @@ -4833,7 +4791,6 @@ subroutine kmkhz_9c ( & end do !$OMP end do NOWAIT - ! (Note, water tracers assume flux_grad = Locketal2000 so no need to ! update wtrac_bl%grad_q_adj as it is always zero) @@ -4842,7 +4799,6 @@ subroutine kmkhz_9c ( & !----------------------------------------------------------------------- if (BL_diag%l_dzh) then - !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end ! fill unset values (rmdi<0) with zero @@ -4856,17 +4812,15 @@ subroutine kmkhz_9c ( & !$OMP end do NOWAIT end if if (BL_diag%l_dscbase) then - - !$OMP do SCHEDULE(STATIC) - do i = pdims%i_start, pdims%i_end - if ( dsc(i,j) ) then - BL_diag%dscbase(i,j)= zhsc(i,j)-dscdepth(i,j) - else - BL_diag%dscbase(i,j)= rmdi - end if - end do - !$OMP end do NOWAIT - + !$OMP do SCHEDULE(STATIC) + do i = pdims%i_start, pdims%i_end + if ( dsc(i,j) ) then + BL_diag%dscbase(i,j)= zhsc(i,j)-dscdepth(i,j) + else + BL_diag%dscbase(i,j)= rmdi + end if + end do + !$OMP end do NOWAIT end if if (BL_diag%l_cldbase) then From 10d600d471cf77014a8530d930950d8de5e2e3d5 Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Thu, 19 Feb 2026 17:12:17 +0000 Subject: [PATCH 12/14] Update versions to update seg size, update KGOs --- .../rose-meta/lfric-adjoint_tests/versions.py | 14 ++++++++++++++ .../rose-meta/lfric-gravity_wave/versions.py | 14 ++++++++++++++ .../rose-meta/lfric-gungho_model/versions.py | 14 ++++++++++++++ .../rose-meta/jedi_common/versions.py | 14 ++++++++++++++ .../rose-meta/jedi_forecast/versions.py | 14 ++++++++++++++ .../rose-meta/jedi_forecast_pseudo/versions.py | 14 ++++++++++++++ .../rose-meta/jedi_id_tlm_tests/versions.py | 14 ++++++++++++++ .../rose-meta/jedi_lfric_tests/versions.py | 16 +++++++++++++++- .../rose-meta/jedi_tlm_forecast_tl/versions.py | 14 ++++++++++++++ .../rose-meta/jedi_tlm_tests/versions.py | 14 ++++++++++++++ .../jules/rose-meta/lfric-jules/versions.py | 14 ++++++++++++++ .../rose-meta/lfric-lfric2lfric/versions.py | 14 ++++++++++++++ .../rose-meta/lfric-lfric_atm/versions.py | 14 ++++++++++++++ .../rose-meta/lfric-lfric_coupled/versions.py | 14 ++++++++++++++ .../rose-meta/lfric-linear_model/versions.py | 14 ++++++++++++++ .../rose-meta/lfric-name_transport/versions.py | 14 ++++++++++++++ .../ngarch/rose-meta/lfric-ngarch/versions.py | 14 ++++++++++++++ .../rose-meta/lfric-shallow_water/versions.py | 14 ++++++++++++++ .../rose-meta/lfric-transport/versions.py | 14 ++++++++++++++ .../rose-meta/coupling/versions.py | 14 ++++++++++++++ .../rose-meta/jedi_lfric_interface/versions.py | 14 ++++++++++++++ ...lim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +++++++------- ..._gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 12 ++++++------ ...lim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +++++++------- ..._gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +++++++------- ..._gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +++++++------- ...al9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +++++++------- ...al9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +++++++------- ...nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +++++++------- ..._gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +++++++------- ...nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt | 14 +++++++------- ..._gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +++++++------- ..._gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +++++++------- .../adjoint/rose-meta/lfric-adjoint/versions.py | 14 ++++++++++++++ .../gungho/rose-meta/lfric-gungho/versions.py | 14 ++++++++++++++ .../linear/rose-meta/lfric-linear/versions.py | 14 ++++++++++++++ 36 files changed, 420 insertions(+), 84 deletions(-) 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 f54b9bcfb..9d1171b55 100644 --- a/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py +++ b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py @@ -194,3 +194,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 8bab40a9e..67176db29 100644 --- a/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py +++ b/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py @@ -171,3 +171,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 8bab40a9e..67176db29 100644 --- a/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py +++ b/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py @@ -171,3 +171,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 4fba3ac35..8a947131f 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py @@ -204,3 +204,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 49fcd1681..23cc598fe 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py @@ -211,3 +211,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 49fcd1681..4573ea0bd 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 @@ -211,3 +211,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 49fcd1681..23cc598fe 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 @@ -211,3 +211,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 49fcd1681..1ba18ec3c 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 @@ -1,4 +1,4 @@ -import re + re import sys from metomi.rose.upgrade import MacroUpgrade @@ -211,3 +211,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 49fcd1681..23cc598fe 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 @@ -211,3 +211,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 49fcd1681..23cc598fe 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 @@ -211,3 +211,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 8bab40a9e..67176db29 100644 --- a/applications/jules/rose-meta/lfric-jules/versions.py +++ b/applications/jules/rose-meta/lfric-jules/versions.py @@ -171,3 +171,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 85f9ad8cf..6bd89dfa2 100644 --- a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py @@ -187,3 +187,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 8bab40a9e..67176db29 100644 --- a/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py +++ b/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py @@ -171,3 +171,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 8bab40a9e..67176db29 100644 --- a/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py +++ b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py @@ -171,3 +171,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 f54b9bcfb..9d1171b55 100644 --- a/applications/linear_model/rose-meta/lfric-linear_model/versions.py +++ b/applications/linear_model/rose-meta/lfric-linear_model/versions.py @@ -194,3 +194,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 8bab40a9e..67176db29 100644 --- a/applications/name_transport/rose-meta/lfric-name_transport/versions.py +++ b/applications/name_transport/rose-meta/lfric-name_transport/versions.py @@ -171,3 +171,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 8bab40a9e..67176db29 100644 --- a/applications/ngarch/rose-meta/lfric-ngarch/versions.py +++ b/applications/ngarch/rose-meta/lfric-ngarch/versions.py @@ -171,3 +171,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 8bab40a9e..67176db29 100644 --- a/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py +++ b/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py @@ -171,3 +171,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 8bab40a9e..67176db29 100644 --- a/applications/transport/rose-meta/lfric-transport/versions.py +++ b/applications/transport/rose-meta/lfric-transport/versions.py @@ -171,3 +171,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 8bab40a9e..67176db29 100644 --- a/interfaces/coupled_interface/rose-meta/coupling/versions.py +++ b/interfaces/coupled_interface/rose-meta/coupling/versions.py @@ -171,3 +171,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 f54b9bcfb..9d1171b55 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 @@ -194,3 +194,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + return config, self.reports diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt index 2793fcb77..c8b3d1923 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D64F08 -Inner product checksum theta = 519251EC -Inner product checksum u = 6B21F1EB -Inner product checksum mr1 = 3FCF52AE -Inner product checksum mr2 = 3735EC6E -Inner product checksum mr3 = 354085BE -Inner product checksum mr4 = 369BB051 +Inner product checksum rho = 46D64ED4 +Inner product checksum theta = 51925235 +Inner product checksum u = 6B22178C +Inner product checksum mr1 = 3FCF5442 +Inner product checksum mr2 = 372462AC +Inner product checksum mr3 = 3535E787 +Inner product checksum mr4 = 3694F3F9 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 08c96f46d..06beeb78f 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D65C70 +Inner product checksum rho = 48D65C78 Inner product checksum theta = 5399FF3A -Inner product checksum u = 6B12FBCD -Inner product checksum mr1 = 41CC362A -Inner product checksum mr2 = 396975E6 -Inner product checksum mr3 = 37C35D40 -Inner product checksum mr4 = 3941A15A +Inner product checksum u = 6B12FC35 +Inner product checksum mr1 = 41CC3622 +Inner product checksum mr2 = 39666129 +Inner product checksum mr3 = 37C2BCF2 +Inner product checksum mr4 = 39410CCE Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt index 059a2411e..e3bb16303 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D64F44 -Inner product checksum theta = 51925233 -Inner product checksum u = 6B220B62 -Inner product checksum mr1 = 3FCF5FCA -Inner product checksum mr2 = 372F8806 -Inner product checksum mr3 = 3545ED1E -Inner product checksum mr4 = 36A79354 +Inner product checksum rho = 46D64F0E +Inner product checksum theta = 519252B6 +Inner product checksum u = 6B21F8DF +Inner product checksum mr1 = 3FCF5B9B +Inner product checksum mr2 = 373A4AFB +Inner product checksum mr3 = 35415408 +Inner product checksum mr4 = 369D2D2F Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 30df31686..5580d1125 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D65C60 -Inner product checksum theta = 5399FF3A -Inner product checksum u = 6B12FC1A -Inner product checksum mr1 = 41CC36A6 -Inner product checksum mr2 = 396723CA -Inner product checksum mr3 = 37C44570 -Inner product checksum mr4 = 39425A32 +Inner product checksum rho = 48D65C68 +Inner product checksum theta = 5399FF3C +Inner product checksum u = 6B12FAC5 +Inner product checksum mr1 = 41CC35C6 +Inner product checksum mr2 = 39684814 +Inner product checksum mr3 = 37C23BEA +Inner product checksum mr4 = 394151BA Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 91b46d179..e2379751a 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D65C66 -Inner product checksum theta = 5399FF3B -Inner product checksum u = 6B12FAEF -Inner product checksum mr1 = 41CC347A -Inner product checksum mr2 = 39641822 -Inner product checksum mr3 = 37C34A9A -Inner product checksum mr4 = 3941471A +Inner product checksum rho = 48D65C64 +Inner product checksum theta = 5399FF3C +Inner product checksum u = 6B12FC7C +Inner product checksum mr1 = 41CC368F +Inner product checksum mr2 = 3968EBC8 +Inner product checksum mr3 = 37C3DDBE +Inner product checksum mr4 = 39418B9E Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt index d432a32d8..b3b9962c9 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D64DE1 -Inner product checksum theta = 519250EB -Inner product checksum u = 6B225C7F -Inner product checksum mr1 = 3FCF5356 -Inner product checksum mr2 = 3737AB93 -Inner product checksum mr3 = 353EF8DA -Inner product checksum mr4 = 36A59618 +Inner product checksum rho = 46D64E55 +Inner product checksum theta = 5192505F +Inner product checksum u = 6B229367 +Inner product checksum mr1 = 3FCF6020 +Inner product checksum mr2 = 373F199A +Inner product checksum mr3 = 353B0547 +Inner product checksum mr4 = 36A86813 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt index bc66c86ee..97d4521e7 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D64E5E -Inner product checksum theta = 519250D2 -Inner product checksum u = 6B22663C -Inner product checksum mr1 = 3FCF578E -Inner product checksum mr2 = 372E499F -Inner product checksum mr3 = 353E5A2C -Inner product checksum mr4 = 36A0A435 +Inner product checksum rho = 46D64D63 +Inner product checksum theta = 5192507D +Inner product checksum u = 6B227EE7 +Inner product checksum mr1 = 3FCF5DC4 +Inner product checksum mr2 = 373BAE4C +Inner product checksum mr3 = 353CA71C +Inner product checksum mr4 = 36AB2010 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt index f6642fc75..d8cb2c310 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7F710 -Inner product checksum theta = 518E7E70 -Inner product checksum u = 6B17ED5A -Inner product checksum mr1 = 3FCBD9AA -Inner product checksum mr2 = 37AE2D57 -Inner product checksum mr3 = 34BA11F2 -Inner product checksum mr4 = 36D48D90 +Inner product checksum rho = 46D7F80B +Inner product checksum theta = 518E7E99 +Inner product checksum u = 6B17D4FF +Inner product checksum mr1 = 3FCBD659 +Inner product checksum mr2 = 37B236A6 +Inner product checksum mr3 = 34A5A053 +Inner product checksum mr4 = 36D44E0C Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 4049ded94..7b3ee6906 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE1D -Inner product checksum theta = 5392A6CF -Inner product checksum u = 6A97C11B -Inner product checksum mr1 = 41CD0E79 -Inner product checksum mr2 = 39CBC7FB -Inner product checksum mr3 = 37B4CC21 -Inner product checksum mr4 = 395E9DF0 +Inner product checksum rho = 48D7FE2D +Inner product checksum theta = 5392A6D4 +Inner product checksum u = 6A97C0DF +Inner product checksum mr1 = 41CD04C1 +Inner product checksum mr2 = 39CA5528 +Inner product checksum mr3 = 37B1EAB4 +Inner product checksum mr4 = 395FCD3E Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt index 3f71dfb9e..90e90700d 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7F83A -Inner product checksum theta = 518E7E97 -Inner product checksum u = 6B17CBAE -Inner product checksum mr1 = 3FCBF25F -Inner product checksum mr2 = 37A80462 -Inner product checksum mr3 = 34BBE83D -Inner product checksum mr4 = 36D2A506 +Inner product checksum rho = 46D7F7B2 +Inner product checksum theta = 518E7E91 +Inner product checksum u = 6B17E76D +Inner product checksum mr1 = 3FCBDCCA +Inner product checksum mr2 = 37AD3A88 +Inner product checksum mr3 = 34A30ABE +Inner product checksum mr4 = 36C72094 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 5c9a8aed4..edd121f2b 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE0F -Inner product checksum theta = 5392A6B9 -Inner product checksum u = 6A97C2F2 -Inner product checksum mr1 = 41CD07B0 -Inner product checksum mr2 = 39CAE45B -Inner product checksum mr3 = 37AAF652 -Inner product checksum mr4 = 395E5A18 +Inner product checksum rho = 48D7FE09 +Inner product checksum theta = 5392A6A6 +Inner product checksum u = 6A97C6D7 +Inner product checksum mr1 = 41CD07AC +Inner product checksum mr2 = 39CC8D0A +Inner product checksum mr3 = 37A7F56E +Inner product checksum mr4 = 395F95E3 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt index b35419041..ebcb6239a 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE00 -Inner product checksum theta = 5392A6BA -Inner product checksum u = 6A97C3BA -Inner product checksum mr1 = 41CD099C -Inner product checksum mr2 = 39CBF908 -Inner product checksum mr3 = 37AF97A9 -Inner product checksum mr4 = 396227BE +Inner product checksum rho = 48D7FDE7 +Inner product checksum theta = 5392A6B4 +Inner product checksum u = 6A97C5B0 +Inner product checksum mr1 = 41CCFEAA +Inner product checksum mr2 = 39CB6F38 +Inner product checksum mr3 = 37AB8F97 +Inner product checksum mr4 = 396154CC Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/science/adjoint/rose-meta/lfric-adjoint/versions.py b/science/adjoint/rose-meta/lfric-adjoint/versions.py index f54b9bcfb..9d1171b55 100644 --- a/science/adjoint/rose-meta/lfric-adjoint/versions.py +++ b/science/adjoint/rose-meta/lfric-adjoint/versions.py @@ -194,3 +194,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 50d1223d6..0cfcacc05 100644 --- a/science/gungho/rose-meta/lfric-gungho/versions.py +++ b/science/gungho/rose-meta/lfric-gungho/versions.py @@ -152,3 +152,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + 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 86c44b008..271b3b961 100644 --- a/science/linear/rose-meta/lfric-linear/versions.py +++ b/science/linear/rose-meta/lfric-linear/versions.py @@ -185,3 +185,17 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + +class vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #221 by Benjamin Went.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t221" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for the Boundary Layer""" + self.add_setting(config, ["namelist:physics", "bl_segment"], "16") + + return config, self.reports From 58066a7ae80c09f242784106021ca08b8fd6cd1f Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Wed, 4 Mar 2026 13:03:58 +0000 Subject: [PATCH 13/14] merge main into trunk - except versions, they will follow - this requires KGOs to be re-updated --- .github/CODEOWNERS | 10 +- .github/ISSUE_TEMPLATE/bug_report.yml | 3 +- .github/ISSUE_TEMPLATE/custom_issue.yml | 3 +- .github/ISSUE_TEMPLATE/documentation.yml | 3 +- .github/pull_request_template.md | 2 +- CONTRIBUTORS.md | 4 + .../adjoint_tests/example/configuration.nml | 30 +- applications/adjoint_tests/example/iodef.xml | 6 + .../lfric-adjoint_tests/version30_31.py | 284 + .../lfric-adjoint_tests/vn3.1/rose-meta.conf | 1 + .../linear_physics/atlt_bdy_lyr_alg_mod.x90 | 192 + .../linear_physics/atlt_bl_inc_alg_mod.x90 | 187 + .../mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 | 2 +- ...djt_mixed_schur_preconditioner_alg_mod.x90 | 20 +- .../solver/adjt_mixed_solver_alg_mod.x90 | 20 +- .../solver/adjt_pressure_precon_alg_mod.x90 | 22 +- ...adjt_semi_implicit_solver_step_alg_mod.x90 | 19 +- .../atlt_moist_mr_transport_alg_mod.x90 | 18 +- .../control/atlt_theta_transport_alg_mod.x90 | 16 +- .../atlt_transport_control_alg_mod.x90 | 23 +- .../control/atlt_transport_field_alg_mod.x90 | 18 +- .../control/atlt_wind_transport_alg_mod.x90 | 18 +- .../mol/adjt_reconstruct_w3_field_alg_mod.x90 | 17 +- .../mol/adjt_wt_advective_update_alg_mod.x90 | 15 +- .../mol/atlt_advective_and_flux_alg_mod.x90 | 16 +- .../mol/atlt_mol_advective_alg_mod.x90 | 15 +- .../mol/atlt_mol_conservative_alg_mod.x90 | 16 +- .../mol/atlt_reconstruct_w3_field_alg_mod.x90 | 21 +- .../mol/atlt_wt_advective_update_alg_mod.x90 | 20 +- .../source/driver/adjoint_test_driver_mod.f90 | 44 +- .../lfric-gravity_wave/version30_31.py | 207 + .../lfric-gravity_wave/vn3.1/rose-meta.conf | 31 + .../gravity_wave_infrastructure_mod.f90 | 9 +- .../initial_buoyancy_kernel_mod_test.pf | 2 +- .../gungho_model/optimisation/uoe-dial3 | 1 + .../optimisation/uoe-dial3/psykal/global.py | 32 - .../gungho_model/optimisation/uoe-epic | 1 + .../optimisation/uoe-epic/psykal/global.py | 32 - .../lfric-gungho_model/version30_31.py | 207 + .../lfric-gungho_model/vn3.1/rose-meta.conf | 1 + .../example/configuration.nml | 16 +- .../jedi_lfric_tests/example/iodef.xml | 6 + .../example_forecast/configuration.nml | 2 +- .../example_forecast_pseudo/configuration.nml | 14 +- .../configuration_op.nml | 2 +- .../example_forecast_pseudo/iodef.xml | 4 +- .../example_id_tlm_tests/configuration.nml | 28 +- .../example_id_tlm_tests/iodef.xml | 8 + .../example_tlm_forecast_tl/configuration.nml | 31 +- .../configuration_op.nml | 6 +- .../example_tlm_forecast_tl/iodef.xml | 16 +- .../example_tlm_tests/configuration.nml | 29 +- .../example_tlm_tests/iodef.xml | 8 + .../algorithm/algorithm_test.f90 | 2 +- .../rose-meta/jedi_common/version30_31.py | 300 + .../jedi_common/vn3.1/rose-meta.conf | 158 + .../rose-meta/jedi_forecast/version30_31.py | 302 + .../jedi_forecast/vn3.1/rose-meta.conf | 18 + .../jedi_forecast_pseudo/version30_31.py | 302 + .../jedi_forecast_pseudo/vn3.1/rose-meta.conf | 1 + .../jedi_id_tlm_tests/version30_31.py | 302 + .../jedi_id_tlm_tests/vn3.1/rose-meta.conf | 28 + .../jedi_lfric_tests/version30_31.py | 302 + .../jedi_lfric_tests/vn3.1/rose-meta.conf | 93 + .../jedi_tlm_forecast_tl/version30_31.py | 302 + .../jedi_tlm_forecast_tl/vn3.1/rose-meta.conf | 28 + .../rose-meta/jedi_tlm_tests/version30_31.py | 302 + .../jedi_tlm_tests/vn3.1/rose-meta.conf | 25 + .../jedi-interface/jedi_geometry_mod.f90 | 1 - .../jedi_id_linear_model_mod.f90 | 5 +- .../jedi-interface/jedi_linear_model_mod.f90 | 5 +- .../jedi_setup_field_meta_data_mod.F90 | 3 + applications/jules/build/compile_options.mk | 3 +- applications/jules/optimisation/uoe-dial3 | 1 + .../optimisation/uoe-dial3/psykal/global.py | 32 - applications/jules/optimisation/uoe-epic | 1 + .../optimisation/uoe-epic/psykal/global.py | 32 - .../rose-meta/lfric-jules/version30_31.py | 207 + .../lfric-jules/vn3.1/rose-meta.conf | 1 + .../lfric-lfric2lfric/version30_31.py | 229 + .../lfric-lfric2lfric/vn3.1/rose-meta.conf | 292 + .../lfric2lfric_infrastructure_mod.X90 | 4 +- .../initialisation/lfric2lfric_init_mesh.f90 | 33 +- applications/lfric_atm/Makefile | 2 +- .../lfric_atm/build/compile_options.mk | 3 +- .../build/psyclone_transmute_file_list.mk | 3 + .../cpu-azngarch-sandbox/transmute/global.py | 2 +- .../cpu-azngarch-sandbox/transmute/kernel | 2 +- .../cpu-azngarch-sandbox/transmute/science | 2 +- .../transmute/script_options.py | 2 +- .../large_scale_cloud/pc2_bl_forced_cu.py | 47 + .../large_scale_cloud/pc2_bm_initiate.py | 145 + .../large_scale_cloud/pc2_initiation_ctl.py | 37 + .../large_scale_cloud/pc2_bl_forced_cu.py | 47 + .../large_scale_cloud/pc2_bm_initiate.py | 145 + .../large_scale_cloud/pc2_initiation_ctl.py | 37 + .../psykal/algorithm/aerosol_ukca_alg_mod.py | 2 +- .../psykal/algorithm/bl_imp_alg_mod.py | 2 +- .../psykal/algorithm/casim_alg_mod.py | 2 +- .../psykal/algorithm/checksum_alg_mod.py | 2 +- .../psykal/algorithm/conv_comorph_alg_mod.py | 1 + .../psykal/algorithm/conv_gr_alg_mod.py | 1 + .../ffsl/ffsl_advective_updates_alg_mod.py | 1 + .../optimisation/nci-gadi/psykal/global.py | 2 +- .../transmute/boundary_layer/bl_diags_mod.py | 1 + .../boundary_layer/kmkhz_9c_wtrac.py | 1 + .../transmute/boundary_layer/local.py | 1 + .../boundary_layer/script_options.py | 1 + .../optimisation/nci-gadi/transmute/global.py | 10 +- .../gravity_wave_drag/gw_ussp_mod.py | 1 + .../transmute/kernel/bm_tau_kernel_mod.py | 1 + .../transmute/kernel/conv_gr_kernel_mod.py | 1 + .../transmute/kernel/jules_exp_kernel_mod.py | 1 + .../kernel/jules_extra_kernel_mod.py | 1 + .../transmute/kernel/jules_imp_kernel_mod.py | 1 + .../transmute/kernel/lw_kernel_mod.py | 1 + .../kernel/pc2_conv_coupling_kernel_mod.py | 1 + .../kernel/pc2_initiation_kernel_mod.py | 1 + .../transmute/kernel/sw_kernel_mod.py | 1 + .../kernel/sw_rad_tile_kernel_mod.py | 1 + .../large_scale_cloud/pc2_bl_forced_cu.py | 1 + .../large_scale_cloud/pc2_bm_initiate.py | 1 + .../large_scale_cloud/pc2_initiation_ctl.py | 1 + .../core/top_level/ukca_main1-ukca_main1.py | 1 + .../core/aerosols/glomap/ukca_aero_ctl.py | 1 + .../chemistry/ukca_chemistry_ctl_full_mod.py | 1 + .../nci-gadi/transmute/script_options.py | 1 + applications/lfric_atm/optimisation/uoe-dial3 | 1 + .../optimisation/uoe-dial3/psykal/global.py | 32 - .../uoe-dial3/transmute/global.py | 9 - applications/lfric_atm/optimisation/uoe-epic | 1 + .../optimisation/uoe-epic/psykal/global.py | 32 - .../optimisation/uoe-epic/transmute/global.py | 9 - .../rose-meta/lfric-lfric_atm/version30_31.py | 207 + .../lfric-lfric_atm/vn3.1/rose-meta.conf | 1 + applications/lfric_coupled/Makefile | 2 +- .../lfric_coupled/build/compile_options.mk | 3 +- .../lfric-lfric_coupled/version30_31.py | 207 + .../lfric-lfric_coupled/vn3.1/rose-meta.conf | 1 + .../common/lfricinp_lfric_driver_mod.f90 | 2 +- .../plot_convergence/plot_convergence.py | 81 - .../plot_convergence/plot_convergence.sh | 83 - .../lfric-linear_model/version30_31.py | 282 + .../lfric-linear_model/vn3.1/rose-meta.conf | 1 + .../optimisation/niwa-xc50/psykal/global.py | 2 +- .../lfric-name_transport/version30_31.py | 207 + .../lfric-name_transport/vn3.1/rose-meta.conf | 145 + .../driver/name_transport_driver_mod.f90 | 26 +- .../kernel/set_name_field_kernel_mod.F90 | 8 +- .../kernel/set_name_field_kernel_mod_test.pf | 2 +- applications/ngarch/Makefile | 2 +- applications/ngarch/build/compile_options.mk | 3 +- .../build/psyclone_transmute_file_list.mk | 3 + .../large_scale_cloud/pc2_bl_forced_cu.py | 47 + .../large_scale_cloud/pc2_bm_initiate.py | 145 + .../large_scale_cloud/pc2_initiation_ctl.py | 37 + .../rose-meta/lfric-ngarch/version30_31.py | 207 + .../lfric-ngarch/vn3.1/rose-meta.conf | 19 + .../lfric-shallow_water/version30_31.py | 207 + .../lfric-shallow_water/vn3.1/rose-meta.conf | 136 + .../source/driver/shallow_water_model_mod.F90 | 11 +- .../initial_swe_streamfunc_kernel_mod.F90 | 15 +- .../kernel/initial_swe_u_kernel_mod.F90 | 22 +- .../initial_vorticity_v2_kernel_mod.F90 | 15 +- .../kernel/initial_geopot_kernel_mod_test.pf | 2 +- .../initial_swe_buoyancy_kernel_mod_test.pf | 2 +- .../initial_swe_tracer_kernel_mod_test.pf | 2 +- .../kernel/initial_swe_u_kernel_mod_test.pf | 2 +- .../rose-meta/lfric-solver/version30_31.py | 43 + .../lfric-solver/vn3.1/rose-meta.conf | 1109 +++ applications/solver/source/solver.F90 | 2 +- .../rose-meta/lfric-transport/version30_31.py | 207 + .../lfric-transport/vn3.1/rose-meta.conf | 125 + .../source/driver/transport_driver_mod.f90 | 27 +- .../kernel/set_tracer_field_kernel_mod.F90 | 10 +- ...ial_tracer_field_sample_kernel_mod_test.pf | 2 +- .../set_tracer_field_kernel_mod_test.pf | 2 +- build/extract/extract_physics.mk | 5 +- build/extract/extract_science.py | 130 +- build/extract/get_git_sources.py | 402 + build/local_build.py | 115 +- dependencies.yaml | 16 +- .../source/developer_guide/local_builds.rst | 16 + .../rose-meta/coupling/version30_31.py | 207 + .../rose-meta/coupling/vn3.1/rose-meta.conf | 1 + .../jedi_lfric_interface/version30_31.py | 282 + .../jedi_lfric_interface/vn3.1/rose-meta.conf | 1 + .../jedi_lfric_linear_modeldb_driver_mod.f90 | 2 +- .../field/jedi_lfric_linear_fields_mod.f90 | 61 +- .../source/mesh/jedi_lfric_mesh_setup_mod.F90 | 17 +- interfaces/jules_interface/build/import.mk | 3 +- .../rose-meta/jules-lfric/version30_31.py | 122 + .../jules-lfric/vn3.1/rose-meta.conf | 181 + .../rose-meta/jules-lsm/version30_31.py | 124 + .../rose-meta/jules-lsm/vn3.1/rose-meta.conf | 489 ++ .../jules-hydrology/vn3.1/rose-meta.conf | 27 + .../jules-nvegparm/vn3.1/rose-meta.conf | 121 + .../jules-pftparm/vn3.1/rose-meta.conf | 167 + .../jules-radiation/vn3.1/rose-meta.conf | 113 + .../jules-sea-seaice/vn3.1/rose-meta.conf | 245 + .../jules-snow/vn3.1/rose-meta.conf | 99 + .../jules-soil/vn3.1/rose-meta.conf | 31 + .../jules-surface-types/vn3.1/rose-meta.conf | 125 + .../jules-surface/vn3.1/rose-meta.conf | 306 + .../jules-urban/vn3.1/rose-meta.conf | 50 + .../jules-vegetation/vn3.1/rose-meta.conf | 34 + .../transmute_psytrans/transmute_functions.py | 14 + .../rose-meta/um-aerosol/version30_31.py | 43 + .../rose-meta/um-aerosol/vn3.1/rose-meta.conf | 345 + .../um-boundary_layer/version30_31.py | 43 + .../um-boundary_layer/vn3.1/rose-meta.conf | 579 ++ .../rose-meta/um-chemistry/version30_31.py | 43 + .../um-chemistry/vn3.1/rose-meta.conf | 292 + .../rose-meta/um-cloud/version30_31.py | 43 + .../rose-meta/um-cloud/vn3.1/rose-meta.conf | 630 ++ .../rose-meta/um-convection/version30_31.py | 43 + .../um-convection/vn3.1/rose-meta.conf | 170 + .../rose-meta/um-iau/version30_31.py | 43 + .../rose-meta/um-iau/vn3.1/rose-meta.conf | 161 + .../rose-meta/um-microphysics/version30_31.py | 43 + .../um-microphysics/vn3.1/rose-meta.conf | 484 ++ .../um-orographic_drag/version30_31.py | 43 + .../um-orographic_drag/vn3.1/rose-meta.conf | 161 + .../rose-meta/um-spectral_gwd/version30_31.py | 43 + .../um-spectral_gwd/vn3.1/rose-meta.conf | 91 + .../um-stochastic_physics/version30_31.py | 43 + .../vn3.1/rose-meta.conf | 1257 +++ interfaces/socrates_interface/build/import.mk | 3 +- .../socrates-radiation/version30_31.py | 55 + .../socrates-radiation/vn3.1/rose-meta.conf | 1950 +++++ .../app/adjoint_tests/file/file_def_ls.xml | 1 + rose-stem/app/adjoint_tests/file/iodef.xml | 5 + .../opt/rose-app-nwp_gal9_c12.conf | 4 +- rose-stem/app/adjoint_tests/rose-app.conf | 16 +- 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 | 12 + .../app/jedi_forecast_pseudo/rose-app.conf | 12 + .../app/jedi_id_tlm_tests/file/iodef.xml | 8 + rose-stem/app/jedi_id_tlm_tests/rose-app.conf | 18 +- rose-stem/app/jedi_lfric_tests/file/iodef.xml | 6 + .../opt/rose-app-nwp_gal9_c12.conf | 4 +- rose-stem/app/jedi_lfric_tests/rose-app.conf | 18 +- .../app/jedi_tlm_forecast_tl/file/iodef.xml | 8 + .../app/jedi_tlm_forecast_tl/rose-app.conf | 18 +- rose-stem/app/jedi_tlm_tests/file/iodef.xml | 8 + rose-stem/app/jedi_tlm_tests/rose-app.conf | 18 +- 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 +- .../app/linear_model/file/file_def_ls.xml | 1 + rose-stem/app/linear_model/file/iodef.xml | 5 + .../linear_model/opt/rose-app-dcmip301.conf | 11 + .../opt/rose-app-nwp_gal9_c12.conf | 4 +- .../opt/rose-app-runge-kutta.conf | 11 + .../opt/rose-app-semi-implicit.conf | 11 + rose-stem/app/linear_model/rose-app.conf | 16 +- 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 +- .../gungho_model/tasks_gungho_model.cylc | 2 +- .../common/lfric_atm/tasks_lfric_atm.cylc | 2 +- .../meto/common/suite_config_azspice.cylc | 4 +- .../site/meto/common/suite_config_ex1a.cylc | 8 +- .../meto/groups/groups_adjoint_tests.cylc | 6 +- .../site/meto/groups/groups_lfric_atm.cylc | 1 - ...2000x2000_azspice_gnu_fast-debug-64bit.txt | 6 +- ...ic-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...MG-2panel_azspice_gnu_fast-debug-64bit.txt | 6 +- ...MG-3panel_azspice_gnu_fast-debug-64bit.txt | 6 +- ...ic-C48_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...1-C24s_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...C24_MG_op_azspice_gnu_fast-debug-64bit.txt | 6 +- ...G_azspice_gnu_fast-debug-64bit-rtran32.txt | 6 +- ...rt-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...0-100x100_azspice_gnu_fast-debug-64bit.txt | 6 +- ...00-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...og-C48_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...01-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...er-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...ke-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...ez-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...in-C48_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...0x8-10x10_azspice_gnu_fast-debug-64bit.txt | 8 +- ...0x8-10x10_azspice_gnu_fast-debug-64bit.txt | 8 +- ...br-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...C24_MG_op_azspice_gnu_fast-debug-64bit.txt | 6 +- ...G_azspice_gnu_fast-debug-64bit-rtran32.txt | 6 +- ...96_MG_lam_azspice_gnu_fast-debug-64bit.txt | 6 +- ...am_rotate_azspice_gnu_fast-debug-64bit.txt | 6 +- ...8-500x500_azspice_gnu_fast-debug-64bit.txt | 6 +- ...1000x1000_azspice_gnu_fast-debug-64bit.txt | 6 +- ...inear-C12_azspice_gnu_fast-debug-64bit.txt | 2 +- ...er-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...1000x2000_azspice_gnu_fast-debug-64bit.txt | 6 +- ...8-200x200_azspice_gnu_fast-debug-64bit.txt | 6 +- ...4-200x200_azspice_gnu_fast-debug-64bit.txt | 6 +- ...200x50_op_azspice_gnu_fast-debug-64bit.txt | 6 +- ...0_azspice_gnu_fast-debug-64bit-rtran32.txt | 6 +- ...th-C24_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...4s_rot_MG_azspice_gnu_fast-debug-64bit.txt | 6 +- ...x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt | 4 +- ...linic-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...linic-C48_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...t2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...0x10-100x100_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...ip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...lorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...ip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...piter-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...uarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...omain-C48_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...P100x8-10x10_ex1a_gnu_fast-debug-64bit.txt | 8 +- ...P100x8-10x10_ex1a_gnu_fast-debug-64bit.txt | 8 +- ...l_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...t2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...4_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt | 6 +- ...m-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...G_lam_rotate_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...00x8-500x500_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...r-linear-C12_ex1a_gnu_fast-debug-64bit.txt | 2 +- ...piter-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...56x8-200x200_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...56x4-200x200_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...16-200x50_op_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...56x8-200x200_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt | 6 +- ...inear-C12_azspice_gnu_fast-debug-64bit.txt | 2 +- ...inear-C12_azspice_gnu_full-debug-64bit.txt | 2 +- ...l9-C12_MG_azspice_gnu_fast-debug-64bit.txt | 14 +- ...r-linear-C12_ex1a_cce_fast-debug-64bit.txt | 2 +- ..._gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt | 14 +- ...lanet-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...1214b-C12_azspice_gnu_fast-debug-32bit.txt | 6 +- ..._gal9-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ..._chem-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...9458b-C24_azspice_gnu_fast-debug-32bit.txt | 4 +- ...casim-C12_azspice_gnu_fast-debug-32bit.txt | 18 +- ...coma9-C12_azspice_gnu_fast-debug-32bit.txt | 16 +- ...h_dev-C12_azspice_gnu_fast-debug-32bit.txt | 9 - ..._gal9-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ..._gal9-C12_azspice_gnu_fast-debug-64bit.txt | 14 +- ...l9-C48_MG_azspice_gnu_fast-debug-32bit.txt | 14 +- ...-pert-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...ro-C48_MG_azspice_gnu_fast-debug-32bit.txt | 14 +- ...l9_da-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...debug-C12_azspice_gnu_full-debug-32bit.txt | 14 +- ...ug-C48_MG_azspice_gnu_full-debug-32bit.txt | 10 +- ...9_eda-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ..._jada-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...9_mol-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...short-C12_azspice_gnu_fast-debug-32bit.txt | 14 +- ...3-seuk_MG_azspice_gnu_fast-debug-32bit.txt | 14 +- ...s-seuk_MG_azspice_gnu_fast-debug-32bit.txt | 16 +- ...l-seuk_MG_azspice_gnu_fast-debug-32bit.txt | 14 +- ...0x1500_MG_azspice_gnu_fast-debug-32bit.txt | 12 +- ...n1-C48_MG_azspice_gnu_fast-debug-32bit.txt | 4 +- ...uaplanet-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._gj1214b-C12_ex1a_cce_fast-debug-32bit.txt | 4 +- ...lim_gal9-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt | 10 + ...l9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 10 + ..._gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt | 10 + ...l9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 10 + ...l9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 10 + ...al9_chem-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._chem_1T-C12_ex1a_cce_fast-debug-32bit.txt | 10 + ..._chem_2T-C12_ex1a_cce_fast-debug-32bit.txt | 10 + ...1500x1500_MG_ex1a_cce_fast-debug-32bit.txt | 12 +- ...d209458b-C24_ex1a_cce_fast-debug-32bit.txt | 4 +- ...wp_casim-C12_ex1a_cce_fast-debug-32bit.txt | 18 +- ...wp_coma9-C12_ex1a_cce_fast-debug-32bit.txt | 16 +- ...orph_dev-C12_ex1a_cce_fast-debug-32bit.txt | 16 +- ...morph_tb-C12_ex1a_cce_fast-debug-32bit.txt | 16 +- ...nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt | 14 +- ..._gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...al9-pert-C12_ex1a_cce_fast-debug-32bit.txt | 12 +- ..._gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt | 10 + ...l9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 10 + ..._gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt | 10 + ...l9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 10 + ...l9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt | 14 +- ...l9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 10 + ..._aero-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...eaded-C48_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ...eaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt | 14 +- ..._gal9_da-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...l9_debug-C12_ex1a_cce_full-debug-32bit.txt | 12 +- ...debug-C48_MG_ex1a_cce_full-debug-32bit.txt | 12 +- ...gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...eda_jada-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...oukca_1T-C12_ex1a_cce_fast-debug-32bit.txt | 10 - ...ca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 10 - ...oukca_2T-C12_ex1a_cce_fast-debug-32bit.txt | 10 - ...ca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 12 +- ...ca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt | 11 +- ...ca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt | 24 +- ...l9_short-C12_ex1a_cce_fast-debug-32bit.txt | 14 +- ...ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt | 16 +- ...xmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt | 12 +- ...1500x1500_MG_ex1a_cce_fast-debug-32bit.txt | 12 +- ..._ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt | 6 +- ...nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt | 14 +- ...ip301-C24_azspice_gnu_fast-debug-64bit.txt | 6 +- ...l9-C12_MG_azspice_gnu_fast-debug-64bit.txt | 14 +- ...l9-C12_MG_azspice_gnu_production-32bit.txt | 14 +- ...om-C12_MG_azspice_gnu_fast-debug-64bit.txt | 14 +- ...licit-C12_azspice_gnu_fast-debug-64bit.txt | 6 +- ...dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt | 6 +- ..._gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt | 14 +- ..._gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt | 14 +- ..._gal9-C12_MG_ex1a_cce_production-32bit.txt | 14 +- ..._gal9-C12_MG_ex1a_cce_production-64bit.txt | 14 +- ..._gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt | 14 +- ..._gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt | 14 +- ..._gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt | 14 +- ..._gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt | 14 +- ..._gal9-C12_MG_ex1a_gnu_production-32bit.txt | 14 +- ..._gal9-C12_MG_ex1a_gnu_production-64bit.txt | 14 +- ...andom-C12_MG_ex1a_gnu_fast-debug-64bit.txt | 14 +- ...implicit-C12_ex1a_gnu_fast-debug-64bit.txt | 6 +- .../site/nci/common/suite_config_gadi.cylc | 15 +- .../site/uoe/common/default_directives.cylc | 8 +- ...l_kinetic_energy_gradient_kernel_mod.patch | 13 +- .../atl_project_eos_pressure_kernel_mod.patch | 15 +- .../atl_rhs_project_eos_kernel_mod.patch | 13 +- .../atl_vorticity_advection_kernel_mod.patch | 9 +- .../rose-meta/lfric-adjoint/version30_31.py | 282 + .../lfric-adjoint/vn3.1/rose-meta.conf | 1 + .../linear_physics/atl_bdy_lyr_alg.x90 | 141 + .../linear_physics/atl_physics_alg.x90 | 148 + .../algorithm/lookup/adj_lookup_table_mod.x90 | 22 - .../solver/adj_solver_lookup_cache_mod.x90 | 46 +- .../transport/adj_trans_lookup_cache_mod.x90 | 86 +- .../solver/adj_pressure_operator_alg_mod.x90 | 30 +- .../adj_semi_implicit_solver_alg_mod.x90 | 27 +- .../timestepping/atl_si_timestep_alg_mod.x90 | 96 +- .../atl_moist_mr_transport_alg_mod.x90 | 29 +- .../control/atl_split_transport_mod.x90 | 64 +- .../control/atl_theta_transport_alg_mod.x90 | 38 +- .../control/atl_transport_control_alg_mod.x90 | 64 +- .../control/atl_transport_field_mod.f90 | 31 +- .../control/atl_wind_transport_alg_mod.x90 | 34 +- .../mol/adj_reconstruct_w3_field_alg_mod.x90 | 54 +- .../mol/adj_wt_advective_update_alg_mod.x90 | 62 +- .../mol/atl_advective_and_flux_alg_mod.x90 | 84 +- .../mol/atl_mol_advective_alg_mod.x90 | 18 +- .../mol/atl_mol_conservative_alg_mod.x90 | 18 +- .../mol/atl_reconstruct_w3_field_alg_mod.x90 | 39 +- .../mol/atl_wt_advective_update_alg_mod.x90 | 56 +- .../adj_sci_convert_hdiv_field_kernel_mod.F90 | 11 +- .../linear_physics/atl_bl_inc_kernel_mod.F90 | 177 + .../integration-test/cma_test/cma_test.f90 | 10 +- .../rose-meta/lfric-gungho/version30_31.py | 193 + .../lfric-gungho/vn3.1/rose-meta.conf | 6856 +++++++++++++++++ .../intermesh_mappings_alg_mod.x90 | 7 +- .../solver/mixed_operator_alg_mod.x90 | 58 +- .../mixed_schur_preconditioner_alg_mod.x90 | 5 +- .../common/remap_on_extended_mesh_alg_mod.x90 | 3 +- .../transport/ffsl/ffsl_hori_alg_mod.x90 | 9 +- .../mol/reconstruct_w3_field_alg_mod.x90 | 3 +- .../mol/wt_advective_update_alg_mod.x90 | 3 +- .../configuration/check_configuration_mod.F90 | 116 +- .../gungho/source/driver/gungho_model_mod.F90 | 11 +- .../gungho/source/driver/gungho_step_mod.x90 | 12 +- .../assemble_w2h_from_w2hb_kernel_mod.F90 | 95 + .../compute_coriolis_matrix_kernel_mod.F90 | 14 +- .../compute_dl_matrix_kernel_mod.F90 | 11 +- ...ompute_vert_coriolis_matrix_kernel_mod.F90 | 215 - 484 files changed, 28293 insertions(+), 2358 deletions(-) create mode 100644 applications/adjoint_tests/rose-meta/lfric-adjoint_tests/version30_31.py create mode 100644 applications/adjoint_tests/rose-meta/lfric-adjoint_tests/vn3.1/rose-meta.conf create mode 100644 applications/adjoint_tests/source/algorithm/linear_physics/atlt_bdy_lyr_alg_mod.x90 create mode 100644 applications/adjoint_tests/source/algorithm/linear_physics/atlt_bl_inc_alg_mod.x90 create mode 100644 applications/gravity_wave/rose-meta/lfric-gravity_wave/version30_31.py create mode 100644 applications/gravity_wave/rose-meta/lfric-gravity_wave/vn3.1/rose-meta.conf create mode 120000 applications/gungho_model/optimisation/uoe-dial3 delete mode 100644 applications/gungho_model/optimisation/uoe-dial3/psykal/global.py create mode 120000 applications/gungho_model/optimisation/uoe-epic delete mode 100644 applications/gungho_model/optimisation/uoe-epic/psykal/global.py create mode 100644 applications/gungho_model/rose-meta/lfric-gungho_model/version30_31.py create mode 100644 applications/gungho_model/rose-meta/lfric-gungho_model/vn3.1/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_common/version30_31.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_common/vn3.1/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_forecast/version30_31.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_forecast/vn3.1/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/version30_31.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/vn3.1/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/version30_31.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/vn3.1/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/version30_31.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/vn3.1/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/version30_31.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/vn3.1/rose-meta.conf create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/version30_31.py create mode 100644 applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/vn3.1/rose-meta.conf create mode 120000 applications/jules/optimisation/uoe-dial3 delete mode 100644 applications/jules/optimisation/uoe-dial3/psykal/global.py create mode 120000 applications/jules/optimisation/uoe-epic delete mode 100644 applications/jules/optimisation/uoe-epic/psykal/global.py create mode 100644 applications/jules/rose-meta/lfric-jules/version30_31.py create mode 100644 applications/jules/rose-meta/lfric-jules/vn3.1/rose-meta.conf create mode 100644 applications/lfric2lfric/rose-meta/lfric-lfric2lfric/version30_31.py create mode 100644 applications/lfric2lfric/rose-meta/lfric-lfric2lfric/vn3.1/rose-meta.conf create mode 100644 applications/lfric_atm/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bl_forced_cu.py create mode 100644 applications/lfric_atm/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bm_initiate.py create mode 100644 applications/lfric_atm/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_initiation_ctl.py create mode 100644 applications/lfric_atm/optimisation/meto-ex1a/transmute/large_scale_cloud/pc2_bl_forced_cu.py create mode 100644 applications/lfric_atm/optimisation/meto-ex1a/transmute/large_scale_cloud/pc2_bm_initiate.py create mode 100644 applications/lfric_atm/optimisation/meto-ex1a/transmute/large_scale_cloud/pc2_initiation_ctl.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/conv_comorph_alg_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/conv_gr_alg_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/transport/ffsl/ffsl_advective_updates_alg_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/bl_diags_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/kmkhz_9c_wtrac.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/local.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/script_options.py mode change 100644 => 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/global.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/gravity_wave_drag/gw_ussp_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/bm_tau_kernel_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/conv_gr_kernel_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/jules_exp_kernel_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/jules_extra_kernel_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/jules_imp_kernel_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/lw_kernel_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/pc2_conv_coupling_kernel_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/pc2_initiation_kernel_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/sw_kernel_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/sw_rad_tile_kernel_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/large_scale_cloud/pc2_bl_forced_cu.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/large_scale_cloud/pc2_bm_initiate.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/large_scale_cloud/pc2_initiation_ctl.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/science/ukca/src/control/core/top_level/ukca_main1-ukca_main1.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/science/ukca/src/science/core/aerosols/glomap/ukca_aero_ctl.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/science/ukca/src/science/core/chemistry/ukca_chemistry_ctl_full_mod.py create mode 120000 applications/lfric_atm/optimisation/nci-gadi/transmute/script_options.py create mode 120000 applications/lfric_atm/optimisation/uoe-dial3 delete mode 100644 applications/lfric_atm/optimisation/uoe-dial3/psykal/global.py delete mode 100644 applications/lfric_atm/optimisation/uoe-dial3/transmute/global.py create mode 120000 applications/lfric_atm/optimisation/uoe-epic delete mode 100644 applications/lfric_atm/optimisation/uoe-epic/psykal/global.py delete mode 100644 applications/lfric_atm/optimisation/uoe-epic/transmute/global.py create mode 100644 applications/lfric_atm/rose-meta/lfric-lfric_atm/version30_31.py create mode 100644 applications/lfric_atm/rose-meta/lfric-lfric_atm/vn3.1/rose-meta.conf create mode 100644 applications/lfric_coupled/rose-meta/lfric-lfric_coupled/version30_31.py create mode 100644 applications/lfric_coupled/rose-meta/lfric-lfric_coupled/vn3.1/rose-meta.conf delete mode 100644 applications/linear_model/plot_convergence/plot_convergence.py delete mode 100755 applications/linear_model/plot_convergence/plot_convergence.sh create mode 100644 applications/linear_model/rose-meta/lfric-linear_model/version30_31.py create mode 100644 applications/linear_model/rose-meta/lfric-linear_model/vn3.1/rose-meta.conf create mode 100644 applications/name_transport/rose-meta/lfric-name_transport/version30_31.py create mode 100644 applications/name_transport/rose-meta/lfric-name_transport/vn3.1/rose-meta.conf create mode 100644 applications/ngarch/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bl_forced_cu.py create mode 100644 applications/ngarch/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bm_initiate.py create mode 100644 applications/ngarch/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_initiation_ctl.py create mode 100644 applications/ngarch/rose-meta/lfric-ngarch/version30_31.py create mode 100644 applications/ngarch/rose-meta/lfric-ngarch/vn3.1/rose-meta.conf create mode 100644 applications/shallow_water/rose-meta/lfric-shallow_water/version30_31.py create mode 100644 applications/shallow_water/rose-meta/lfric-shallow_water/vn3.1/rose-meta.conf create mode 100644 applications/solver/rose-meta/lfric-solver/version30_31.py create mode 100644 applications/solver/rose-meta/lfric-solver/vn3.1/rose-meta.conf create mode 100644 applications/transport/rose-meta/lfric-transport/version30_31.py create mode 100644 applications/transport/rose-meta/lfric-transport/vn3.1/rose-meta.conf create mode 100644 build/extract/get_git_sources.py create mode 100644 interfaces/coupled_interface/rose-meta/coupling/version30_31.py create mode 100644 interfaces/coupled_interface/rose-meta/coupling/vn3.1/rose-meta.conf create mode 100644 interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/version30_31.py create mode 100644 interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/vn3.1/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/jules-lfric/version30_31.py create mode 100644 interfaces/jules_interface/rose-meta/jules-lfric/vn3.1/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/jules-lsm/version30_31.py create mode 100644 interfaces/jules_interface/rose-meta/jules-lsm/vn3.1/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/vn3.1/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-nvegparm/vn3.1/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-pftparm/vn3.1/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-radiation/vn3.1/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-sea-seaice/vn3.1/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-snow/vn3.1/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-soil/vn3.1/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-surface-types/vn3.1/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-surface/vn3.1/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-urban/vn3.1/rose-meta.conf create mode 100644 interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-vegetation/vn3.1/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-aerosol/version30_31.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-aerosol/vn3.1/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/version30_31.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/vn3.1/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-chemistry/version30_31.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-chemistry/vn3.1/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-cloud/version30_31.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-cloud/vn3.1/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-convection/version30_31.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-convection/vn3.1/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-iau/version30_31.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-iau/vn3.1/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-microphysics/version30_31.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-microphysics/vn3.1/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/version30_31.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/vn3.1/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/version30_31.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/vn3.1/rose-meta.conf create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/version30_31.py create mode 100644 interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/vn3.1/rose-meta.conf create mode 100644 interfaces/socrates_interface/rose-meta/socrates-radiation/version30_31.py create mode 100644 interfaces/socrates_interface/rose-meta/socrates-radiation/vn3.1/rose-meta.conf delete mode 100644 rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit.txt create mode 100644 science/adjoint/rose-meta/lfric-adjoint/version30_31.py create mode 100644 science/adjoint/rose-meta/lfric-adjoint/vn3.1/rose-meta.conf create mode 100644 science/adjoint/source/algorithm/linear_physics/atl_bdy_lyr_alg.x90 create mode 100644 science/adjoint/source/algorithm/linear_physics/atl_physics_alg.x90 create mode 100644 science/adjoint/source/kernel/linear_physics/atl_bl_inc_kernel_mod.F90 create mode 100644 science/gungho/rose-meta/lfric-gungho/version30_31.py create mode 100644 science/gungho/rose-meta/lfric-gungho/vn3.1/rose-meta.conf create mode 100644 science/gungho/source/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod.F90 delete mode 100644 science/gungho/source/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod.F90 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c005bbe44..979887d62 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -7,13 +7,14 @@ **/adjoint_tests @DrTVockerodtMO # @mo-joshuacolclough **/gravity_wave @thomasmelvin # @cjohnson-pi **/gungho_model @thomasmelvin # @BShipway -**/jedi_lfric_tests @ss421 @matthewrmshin # @DavidSimonin +**/jedi_lfric_tests @ss421 @matthewrmshin @MetOffice/r2o-systems **/jules @iboutle # @MetOfficessdtesam +**/lfric2lfric @mo-lottieturner # @mike-hobson **/lfricinputs @mo-lottieturner # @mike-hobson **/lfric_atm @iboutle # @BShipway **/lfric_coupled @HengistPodd # @BShipway **/lfricinputs @mo-lottieturner # @mike-hobson -**/linear_model @cjohnson-pi @ss421 @matthewrmshin # @tommbendall # Also notifiy jedi team about linear changes. +**/linear_model @cjohnson-pi @MetOffice/r2o-systems # @tommbendall # Also notifiy jedi team about linear changes. **/name_transport @jameskent-metoffice # @tommbendall **/ngarch @christophermaynard # @jcsmeto **/shallow_water @jameskent-metoffice # @atb1995 @@ -22,7 +23,7 @@ # Science **/adjoint @DrTVockerodtMO # @mo-joshuacolclough -**/linear @cjohnson-pi @ss421 @matthewrmshin # @tommbendall # Also notifiy jedi team about linear changes. +**/linear @cjohnson-pi @MetOffice/r2o-systems # @tommbendall # Also notifiy jedi team about linear changes. science/shared/source/constants/ @iboutle # @BShipway **/gungho @thomasmelvin # @iboutle @@ -53,7 +54,7 @@ science/physics_schemes/**/stochastic_physics @wjtmo # @a # Interfaces **/coupled_interface @mike-hobson # @harry-shepherd -**/jedi_lfric_interface @ss421 @matthewrmshin # @DavidSimonin +**/jedi_lfric_interface @ss421 @matthewrmshin @MetOffice/r2o-systems **/jules_interface @iboutle # @MetOfficessdteam **/jules_interface/rose-meta @maggiehendry **/physics_schemes_interface @iboutle # @MetOfficessdteam @@ -70,6 +71,7 @@ rose-stem/apps # Mostly updated by macros, no codeowner build/ @MetOffice/ssdteam @hiker **/*Makefile @MatthewHambley @hiker **/*.mk @MatthewHambley @hiker +**/optimisation @christophermaynard # HPC Optimisation Team # Other areas documentation # @MetOffice/ssdteam diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 8314c000f..d9804a62b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -6,7 +6,8 @@ body: - type: markdown attributes: value: | - Thanks for taking the time to fill out this bug report! + Thanks for taking the time to fill out this bug report! _If you are planning + to work on this issue, then please assign yourself to it._ - type: dropdown id: version attributes: diff --git a/.github/ISSUE_TEMPLATE/custom_issue.yml b/.github/ISSUE_TEMPLATE/custom_issue.yml index 18f5b5e15..a7efac109 100644 --- a/.github/ISSUE_TEMPLATE/custom_issue.yml +++ b/.github/ISSUE_TEMPLATE/custom_issue.yml @@ -6,7 +6,8 @@ body: - type: markdown attributes: value: | - Thanks for taking the time to help improve LFRic Apps. + Thanks for taking the time to help improve LFRic Apps. _If you are planning + to work on this issue, then please assign yourself to it._ - type: input id: linked-issues attributes: diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml index cc9d98f3e..b7f28e622 100644 --- a/.github/ISSUE_TEMPLATE/documentation.yml +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -6,7 +6,8 @@ body: - type: markdown attributes: value: | - Thanks for taking the time to help improve the LFRic Apps documentation. + Thanks for taking the time to help improve the LFRic Apps documentation. + _If you are planning to work on this issue, then please assign yourself to it._ - type: input id: linked-issues attributes: diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index bcfbc8fc0..240f53879 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -63,7 +63,7 @@ Code Reviewer: ## PSyclone Approval -- [ ] If you have edited any PSyclone-related code (e.g. PSyKAl-lite, Kernel interface, optimisation scripts, LFRic data structure code) then please contact the [TCD Team](toolscollabdevteam@metoffice.gov.uk) +- [ ] If you have edited any PSyclone-related code (e.g. PSyKAl-lite, Kernel interface, optimisation scripts, LFRic data structure code) then please contact the [TCD Team](mailto:ToolsCollabDevTeam@metoffice.gov.uk) # Sci/Tech Review diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 507cd2799..00c6e6edb 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -6,6 +6,7 @@ | jennyhickson | Jenny Hickson | Met Office | 2025-12-10 | | mike-hobson | Mike Hobson | Met Office | 2025-12-17 | | mo-marqh | mark Hedley | Met Office | 2025-12-11 | +| mo-rickywong | Ricky Wong | Met Office | 2026-24-02 | | yaswant | Yaswant Pradhan | Met Office | 2025-12-16 | | oakleybrunt | Oakley Brunt | Met Office | 2025-12-19 | | harry-shepherd | Harry Shepherd | Met Office | 2026-01-08 | @@ -31,3 +32,6 @@ | ukmo-juan-castillo | Juan M. Castillo | Met Office | 2026-01-23 | | Adrian-Lock | Adrian Lock | Met Office | 2026-01-09 | | thomasmelvin | Thomas Melvin | Met Office | 2026-01-15 | +| tinyendian | Wolfgang Hayek | Earth Sciences New Zealand | 2026-02-02 | +| DanStoneMO | Daniel Stone | Met Office | 2026-02-26 | +| ericaneininger | Erica Neininger | Met Office | 2026-03-02 | \ No newline at end of file diff --git a/applications/adjoint_tests/example/configuration.nml b/applications/adjoint_tests/example/configuration.nml index c69b29ac7..6061f8833 100644 --- a/applications/adjoint_tests/example/configuration.nml +++ b/applications/adjoint_tests/example/configuration.nml @@ -68,8 +68,8 @@ stretching_method='smooth', ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='', diag_stem_name='diagGungho', -ls_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', -ls_filename='final_ls', +ls_directory='/data/users/lfricadmin/data/tangent-linear/PullRequest182' +ls_filename='final_ls_with_land', orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', start_dump_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', start_dump_filename='final_pert', @@ -220,13 +220,24 @@ write_fluxes=.false., write_minmax_tseries=.false., / &linear -fixed_ls=.true. -l_stabilise_bl=.true., +fixed_ls=.true., +l_stabilise_bl=.false., ls_read_w2h=.false., max_bl_stabilisation=0.75, n_bl_levels_to_stabilise=15, pert_option='file', -transport_efficiency=.true. +transport_efficiency=.true., +/ +&linear_physics +blevs_m=15, +e_folding_levs_m=10, +l_0_m=80.0, +l_boundary_layer=.true., +log_layer=2, +u_land_m=0.4, +u_sea_m=0.4, +z_land_m=0.05, +z_sea_m=0.0005, / &logging log_to_rank_zero_only=.false., @@ -275,11 +286,16 @@ panel_yproc=1, partitioner='cubedsphere', / &physics -configure_segments=.false., +bl_segment=0, +configure_segments=.true., +conv_gr_segment=16, +gw_segment=0, limit_drag_incs=.false., +ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., sample_physics_winds_correction=.false., +ussp_segment=0, / &planet cp=1005.0, @@ -355,7 +371,7 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_tracer_equation=.false. +adjust_tracer_equation=.false., adjust_vhv_wind=.false., ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/adjoint_tests/example/iodef.xml b/applications/adjoint_tests/example/iodef.xml index 0339d116f..4e14df122 100644 --- a/applications/adjoint_tests/example/iodef.xml +++ b/applications/adjoint_tests/example/iodef.xml @@ -50,6 +50,11 @@ + + + + + @@ -322,6 +327,7 @@ + diff --git a/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/version30_31.py b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/version30_31.py new file mode 100644 index 000000000..3c1561ee7 --- /dev/null +++ b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/version30_31.py @@ -0,0 +1,284 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t182" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/vn3.1/rose-meta.conf new file mode 100644 index 000000000..4f4db0daa --- /dev/null +++ b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/vn3.1/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-adjoint/vn3.1 diff --git a/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bdy_lyr_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bdy_lyr_alg_mod.x90 new file mode 100644 index 000000000..c1294aa55 --- /dev/null +++ b/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bdy_lyr_alg_mod.x90 @@ -0,0 +1,192 @@ +!----------------------------------------------------------------------------- +! (c) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be brief. +!----------------------------------------------------------------------------- +!> @brief Module containing adjoint test for atl_bdy_lyr_alg +module atlt_bdy_lyr_alg_mod + + use sci_assign_field_random_range_alg_mod, & + only : assign_field_random_range + use field_mod, only : field_type + use function_space_mod, only : function_space_type + use constants_mod, only : r_def, i_def, l_def + use field_indices_mod, only : igh_u, igh_t, & + igh_d, igh_p + use log_mod, only : log_event, & + log_scratch_space, & + LOG_LEVEL_INFO, & + LOG_LEVEL_DEBUG, & + LOG_LEVEL_ERROR + use mesh_mod, only : mesh_type + use derived_config_mod, only : bundle_size + use driver_modeldb_mod, only : modeldb_type + use finite_element_config_mod, only : element_order_h, element_order_v + use fs_continuity_mod, only : W2, W3, Wtheta + use function_space_collection_mod, only : function_space_collection + use adjoint_test_parameters_mod, only : ls_u_range, ls_theta_range, & + ls_rho_range, ls_exner_range + use timing_mod, only : start_timing, stop_timing, tik, LPROF + + implicit none + + public + + contains + + !============================================================================= + !> @brief Adjoint test for atl_bdy_lyr_alg. + !> @details Passes if adjoint is transpose of tangent linear. + !> Determined by testing the equality of inner products and , + !> where M is the tangent linear and A is the adjoint. + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + subroutine atlt_bdy_lyr_alg( modeldb, mesh ) + + use tl_bdy_lyr_alg_mod, only : tl_bdy_lyr_alg + use atl_bdy_lyr_alg_mod, only : atl_bdy_lyr_alg + + implicit none + + ! Arguments + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + + ! Arguments for tl and atl calls + ! Form of state is [u,theta,rho,exner] + type(field_type) :: state(bundle_size) + type(field_type) :: u_bl_inc + type(field_type) :: ls_state(bundle_size) + + ! Copies of input fields used in inner products + type(field_type) :: state_input(bundle_size) + type(field_type) :: u_bl_inc_input + + ! Pointers for initialising fields + type(function_space_type), pointer :: vector_space_wtheta_ptr + type(function_space_type), pointer :: vector_space_w2_ptr + type(function_space_type), pointer :: vector_space_w3_ptr + + ! Inner products + real(kind=r_def) :: inner1 + real(kind=r_def) :: inner2 + real(kind=r_def) :: ip1(2),ip2(2) + real(kind=r_def) :: sf(2) + + ! Test parameters and variables + real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def + real(kind=r_def) :: machine_tol + real(kind=r_def) :: relative_diff + real(kind=r_def), parameter :: eps = 1e-30_r_def + + ! Misc + real(kind=r_def) :: dt + + integer(kind=tik) :: id + + if ( LPROF ) call start_timing( id, 'atlt_bdy_lyr_alg' ) + + ! Determining time constants + dt = real(modeldb%clock%get_seconds_per_step(), r_def) + if ( dt <= 0.0_r_def ) then + write( log_scratch_space, * ) "dt cannot be leq 0, found dt = ", dt + call log_event( log_scratch_space, log_level_error ) + end if + + ! Initialising fields + vector_space_wtheta_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, Wtheta ) + vector_space_w2_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, W2 ) + vector_space_w3_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, W3 ) + + call state(igh_u) % initialise( vector_space = vector_space_w2_ptr ) + call state(igh_t) % initialise( vector_space = vector_space_wtheta_ptr ) + call state(igh_d) % initialise( vector_space = vector_space_w3_ptr ) + call state(igh_p) % initialise( vector_space = vector_space_w3_ptr ) + call u_bl_inc % initialise( vector_space = vector_space_w2_ptr ) + + call state(igh_u) % copy_field_properties( state_input(igh_u) ) + call state(igh_t) % copy_field_properties( state_input(igh_t) ) + call state(igh_d) % copy_field_properties( state_input(igh_d) ) + call state(igh_p) % copy_field_properties( state_input(igh_p) ) + call state(igh_u) % copy_field_properties( u_bl_inc_input ) + + call state(igh_u) % copy_field_properties( ls_state(igh_u) ) + call state(igh_t) % copy_field_properties( ls_state(igh_t) ) + call state(igh_d) % copy_field_properties( ls_state(igh_d) ) + call state(igh_p) % copy_field_properties( ls_state(igh_p) ) + + ! Initialise values and call the tangent-linear alg. + call invoke( setval_random( u_bl_inc ), & + setval_x(u_bl_inc_input, u_bl_inc ), & + setval_random( state(igh_u) ), & + setval_x( state_input(igh_u), state(igh_u) ), & + setval_random( state(igh_t) ), & + setval_x( state_input(igh_t), state(igh_t) ), & + setval_random( state(igh_d) ), & + setval_x( state_input(igh_d), state(igh_d) ), & + setval_random( state(igh_p) ), & + setval_x( state_input(igh_p), state(igh_p) ) ) + + ! LS init + call assign_field_random_range( ls_state(igh_u), ls_u_range(1), ls_u_range(2) ) + call assign_field_random_range( ls_state(igh_t), ls_theta_range(1), ls_theta_range(2) ) + call invoke( setval_random( ls_state(igh_d) ), setval_random( ls_state(igh_p) ) ) + + ! Tangent linear + call tl_bdy_lyr_alg(modeldb, u_bl_inc, state(igh_u), ls_state, dt ) + + ! < Mx, Mx > + call invoke( x_innerproduct_x( ip1(1), state(igh_u) ), & + x_innerproduct_x( ip1(2), u_bl_inc ) ) + + sf(1) = 1.0_r_def / (ip1(1) + eps) + sf(2) = 1.0_r_def / (ip1(2) + eps) + + inner1 = 0.0_r_def + inner1 = inner1 + ip1(1) * sf(1) + inner1 = inner1 + ip1(2) * sf(2) + + ! Scaling fields + call invoke( inc_a_times_X( sf(1), state(igh_u) ), & + inc_a_times_X( sf(2), u_bl_inc ) ) + + ! Adjoint alg call and inner products + + ! Adjoint + call atl_bdy_lyr_alg(modeldb, u_bl_inc, state(igh_u), ls_state, dt ) + + ! < AMx, x > + call invoke( x_innerproduct_y( ip2(1), & + state(igh_u), & + state_input(igh_u) ), & + x_innerproduct_y( ip2(2), & + u_bl_inc, & + u_bl_inc_input ) ) + + inner2 = 0.0_r_def + inner2 = inner2 + ip2(1) + inner2 = inner2 + ip2(2) + + write( log_scratch_space, * ) 'atlt_bdy_lyr_alg: ad test for tl_bdy_lyr_alg: ip1=', ip1(1) * sf(1), ip1(2) * sf(2) + call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) + write( log_scratch_space, * ) 'atlt_bdy_lyr_alg: ad test for tl_bdy_lyr_alg: ip2=', ip2 + call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) + write( log_scratch_space, * ) 'atlt_bdy_lyr_alg: ad test for tl_bdy_lyr_alg: s(ip1),s(ip2)=', inner1, inner2 + call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) + + ! Test the inner-product values for equality, allowing for the precision of the active variables + machine_tol = spacing( max( abs( inner1 ), abs( inner2 ) ) ) + relative_diff = abs( inner1 - inner2 ) / machine_tol + if ( relative_diff < overall_tolerance ) then + write( log_scratch_space, * ) "PASSED tl_bdy_lyr_alg:", inner1, inner2, relative_diff + call log_event( log_scratch_space, LOG_LEVEL_INFO ) + else + write( log_scratch_space, * ) "FAILED tl_bdy_lyr_alg:", inner1, inner2, relative_diff + call log_event( log_scratch_space, LOG_LEVEL_ERROR ) + end if + + if ( LPROF ) call stop_timing( id, 'atlt_bdy_lyr_alg' ) + + end subroutine atlt_bdy_lyr_alg + +end module atlt_bdy_lyr_alg_mod diff --git a/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bl_inc_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bl_inc_alg_mod.x90 new file mode 100644 index 000000000..c617ba147 --- /dev/null +++ b/applications/adjoint_tests/source/algorithm/linear_physics/atlt_bl_inc_alg_mod.x90 @@ -0,0 +1,187 @@ +!----------------------------------------------------------------------------- +! (c) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be brief. +!----------------------------------------------------------------------------- +!> @brief Module containing adjoint test for atl_bl_inc_kernel +module atlt_bl_inc_alg_mod + + use sci_assign_field_random_range_alg_mod, & + only : assign_field_random_range + use sci_geometric_constants_mod, only: get_face_selector_ew, & + get_face_selector_ns + use integer_field_mod, only: integer_field_type + use field_mod, only : field_type + use function_space_mod, only : function_space_type + use log_mod, only : log_event, & + log_scratch_space, & + LOG_LEVEL_ERROR, & + LOG_LEVEL_DEBUG, & + LOG_LEVEL_INFO + use mesh_mod, only : mesh_type + use function_space_collection_mod, only : function_space_collection + use finite_element_config_mod, only : element_order_h, element_order_v + use fs_continuity_mod, only : W2, W3, Wtheta + use constants_mod, only : i_def, r_def + use quadrature_face_mod, only : quadrature_face_type + use quadrature_rule_gaussian_mod, only : quadrature_rule_gaussian_type + use reference_element_mod, only : reference_element_type + use planet_config_mod, only : cp + use adjoint_test_parameters_mod, only : ls_theta_range, & + ls_exner_range, & + ls_md1_range, & + ls_md2_range, & + ls_md3_range + use timing_mod, only : start_timing, stop_timing, tik, LPROF + + implicit none + + public + + contains + + !============================================================================= + !> @brief Adjoint test for atl_bl_inc. + !> @details Passes if adjoint is transpose of tangent linear. + !> Determined by testing the equality of inner products and , + !> where M is the tangent linear and A is the adjoint. + !> @param[in] mesh Mesh object + subroutine atlt_bl_inc_alg( mesh ) + + use tl_bl_inc_kernel_mod, only : tl_bl_inc_kernel_type + use atl_bl_inc_kernel_mod, only : atl_bl_inc_kernel_type + use linear_physics_config_mod, only : log_layer, & + Blevs_m, & + e_folding_levs_m, & + u_land_m, & + u_sea_m, & + z_land_m, & + z_sea_m, & + L_0_m + + implicit none + + ! Arguments + type(mesh_type), pointer, intent(in) :: mesh + + ! Arguments for tl and adj calls + type( field_type) :: u_inc + type( field_type) :: u + type( field_type) :: auv + type( field_type) :: buv_inv + type(integer_field_type), pointer :: face_selector_ew => null() + type(integer_field_type), pointer :: face_selector_ns => null() + + ! Copies of input fields used in inner products + type( field_type) :: u_inc_input + type( field_type) :: u_input + + ! Pointers for initialising fields + type(function_space_type), pointer :: vector_space_wtheta_ptr + type(function_space_type), pointer :: vector_space_w2_ptr + type(function_space_type), pointer :: vector_space_w3_ptr + + ! Inner products + real(kind=r_def) :: ip1(2) + real(kind=r_def) :: ip2(2) + real(kind=r_def) :: sf(2) + real(kind=r_def) :: inner1 + real(kind=r_def) :: inner2 + + ! Test parameters and variables + real(kind=r_def), parameter :: overall_tolerance = 3000.0_r_def + real(kind=r_def) :: machine_tol + real(kind=r_def) :: relative_diff + real(kind=r_def), parameter :: eps = 1e-30_r_def + + integer(kind=tik) :: id + + if ( LPROF ) call start_timing( id, 'atlt_bl_inc_alg' ) + + vector_space_wtheta_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, Wtheta ) + vector_space_w2_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, W2 ) + vector_space_w3_ptr => function_space_collection % get_fs( mesh, element_order_h, element_order_v, W3 ) + + call auv % initialise( vector_space = vector_space_w2_ptr, name = 'auv' ) + call buv_inv % initialise( vector_space = vector_space_w2_ptr, name = 'buv_inv' ) + + call u_inc % initialise( vector_space = vector_space_w2_ptr, name = 'u_inc' ) + call u % initialise( vector_space = vector_space_w2_ptr, name = 'u' ) + + face_selector_ew => get_face_selector_ew(mesh%get_id()) + face_selector_ns => get_face_selector_ns(mesh%get_id()) + + call u_inc % copy_field_properties( u_inc_input ) + call u % copy_field_properties( u_input ) + + ! Initialise arguments and call the tangent-linear kernel. + call invoke( setval_random( u ), & + setval_x( u_input, u ), & + setval_random( u_inc ), & + setval_x( u_inc_input, u_inc ) ) + + ! LS init + call assign_field_random_range( auv, -1.0_r_def, 1.0_r_def ) + call assign_field_random_range( buv_inv, 1.0_r_def, 2.0_r_def ) ! must avoid 0 + + ! < Mx, Mx > + call invoke ( tl_bl_inc_kernel_type( u_inc, & + u, & + auv,buv_inv, & + face_selector_ew, & + face_selector_ns, & + Blevs_m ) ) + call invoke ( x_innerproduct_x( ip1(1), u_inc ), & + x_innerproduct_x( ip1(2), u ) ) + + sf(1) = 1.0_r_def / (ip1(1) + eps) + sf(2) = 1.0_r_def / (ip1(2) + eps) + + inner1 = 0.0_r_def + inner1 = inner1 + ip1(1) * sf(1) + inner1 = inner1 + ip1(2) * sf(2) + + ! Scaling fields + call invoke( inc_a_times_X( sf(1), u_inc ), & + inc_a_times_X( sf(2), u ) ) + + ! < AMx, x > + call invoke ( atl_bl_inc_kernel_type( u_inc, & + u, & + auv,buv_inv, & + face_selector_ew, & + face_selector_ns, & + Blevs_m ) ) + + call invoke ( x_innerproduct_y( ip2(1), u_inc, u_inc_input ), & + x_innerproduct_y( ip2(2), u, u_input ) ) + + inner2 = 0.0_r_def + inner2 = inner2 + ip2(1) + inner2 = inner2 + ip2(2) + + write( log_scratch_space, * ) 'atlt_bl_inc_alg: ad test for atl_bl_inc_kernel_type: ip1=', & + ip1(1) * sf(1), ip1(2) * sf(2) + call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) + write( log_scratch_space, * ) 'atlt_bl_inc_alg: ad test for atl_bl_inc_kernel_type: ip2=', ip2 + call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) + write( log_scratch_space, * ) 'atlt_bl_inc_alg: ad test for atl_bl_inc_kernel_type: s(ip1),s(ip2)=', & + inner1, inner2 + call log_event( log_scratch_space, LOG_LEVEL_DEBUG ) + + ! Test the inner-product values for equality, allowing for the precision of the active variables + machine_tol = spacing( max( abs(inner1), abs(inner2) ) ) + relative_diff = abs(inner1 - inner2) / machine_tol + if (relative_diff < overall_tolerance) then + write(log_scratch_space, *) "PASSED tl_bl_inc:", inner1, inner2, relative_diff + call log_event(log_scratch_space, LOG_LEVEL_INFO) + else + write(log_scratch_space, *) "FAILED tl_bl_inc:", inner1, inner2, relative_diff + call log_event(log_scratch_space, LOG_LEVEL_ERROR) + end if + + if ( LPROF ) call stop_timing( id, 'atlt_bl_inc_alg' ) + + end subroutine atlt_bl_inc_alg + +end module atlt_bl_inc_alg_mod diff --git a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 index 55dad0c6c..112891ecb 100644 --- a/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/lookup/transport/mol/adjt_w3h_adv_upd_lookup_alg_mod.x90 @@ -145,7 +145,7 @@ module adjt_w3h_adv_upd_lookup_alg_mod adv_inc_adv_inc_inp_inner_prod = 0.0_r_def tracer_tracer_input_inner_prod = 0.0_r_def - lookup_w3h_adv_upd => adj_lookup_table_cache%get_lookup_w3h_adv_upd() + lookup_w3h_adv_upd => adj_lookup_table_cache%get_lookup_w3h_adv_upd(wind%which_function_space()) lookup_w3h_adv_upd_field => lookup_w3h_adv_upd%get_lookup_field() set_count_w3h_adv_upd_field => lookup_w3h_adv_upd%get_set_count_field() nsets = lookup_w3h_adv_upd%get_nsets_max() diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_schur_preconditioner_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_schur_preconditioner_alg_mod.x90 index daacef89c..d29d53c46 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_schur_preconditioner_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_schur_preconditioner_alg_mod.x90 @@ -7,6 +7,7 @@ module adjt_mixed_schur_preconditioner_alg_mod + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type use constants_mod, only: i_def, r_def, l_def, r_solver, EPS use log_mod, only: log_event, & log_scratch_space, & @@ -59,16 +60,18 @@ contains !! the result stored in the other, so we use three vectors to save on !! variables. This differs from other adjoint tests as most adjoint !! routines would increment one argument and set the other to zero. - !> @param[in,out] modeldb Structure containing the model state - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine adjt_mixed_schur_preconditioner_alg( modeldb, mesh, model_clock ) + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adjt_mixed_schur_preconditioner_alg( modeldb, mesh, model_clock, adj_lookup_table_cache ) implicit none - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Prognostic fields type(field_type), dimension(bundle_size) :: rhs @@ -165,7 +168,8 @@ contains call create_pressure_solver( pressure_operator, pressure_preconditioner, pressure_solver ) call create_mixed_preconditioner( rhs, pressure_solver, mixed_preconditioner ) - call create_adj_pressure_preconditioner( rhs, adj_pressure_operator, adj_pressure_preconditioner ) + call create_adj_pressure_preconditioner( rhs, adj_lookup_table_cache, & + adj_pressure_operator, adj_pressure_preconditioner ) call create_adj_pressure_solver( adj_pressure_operator, adj_pressure_preconditioner, adj_pressure_solver ) call create_adj_mixed_preconditioner( rhs, adj_pressure_solver, adj_mixed_preconditioner ) diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_solver_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_solver_alg_mod.x90 index b908b1251..51b712148 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_solver_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_mixed_solver_alg_mod.x90 @@ -7,6 +7,7 @@ module adjt_mixed_solver_alg_mod + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type use constants_mod, only: i_def, r_def, l_def, r_solver, EPS use log_mod, only: log_event, & log_scratch_space, & @@ -70,16 +71,18 @@ contains !! the result stored in the other, so we use three vectors to save on !! variables. This differs from other adjoint tests as most adjoint !! routines would increment one argument and set the other to zero. - !> @param[in,out] modeldb Structure containing the model state - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine adjt_mixed_solver_alg( modeldb, mesh, model_clock ) + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adjt_mixed_solver_alg( modeldb, mesh, model_clock, adj_lookup_table_cache ) implicit none - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Prognostic fields type(field_type) :: rhs(bundle_size) @@ -195,7 +198,8 @@ contains call create_mixed_preconditioner( rhs, pressure_solver, mixed_preconditioner ) call create_mixed_solver( mixed_preconditioner, mixed_operator, mixed_solver ) - call create_adj_pressure_preconditioner( rhs, adj_pressure_operator, adj_pressure_preconditioner ) + call create_adj_pressure_preconditioner( rhs, adj_lookup_table_cache, & + adj_pressure_operator, adj_pressure_preconditioner ) call create_adj_pressure_solver( adj_pressure_operator, adj_pressure_preconditioner, adj_pressure_solver ) call create_adj_mixed_preconditioner( rhs, adj_pressure_solver, adj_mixed_preconditioner ) call create_adj_mixed_solver( adj_mixed_preconditioner, adj_mixed_operator, adj_mixed_solver ) diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_pressure_precon_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_pressure_precon_alg_mod.x90 index 8a938caf2..ea0c0eb80 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_pressure_precon_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_pressure_precon_alg_mod.x90 @@ -7,6 +7,7 @@ module adjt_pressure_precon_alg_mod + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type use constants_mod, only: i_def, r_def, l_def, r_solver, EPS use log_mod, only: log_event, & log_scratch_space, & @@ -53,16 +54,18 @@ contains !! the result stored in the other, so we use three vectors to save on !! variables. This differs from other adjoint tests as most adjoint !! routines would increment one argument and set the other to zero. - !> @param[in,out] modeldb Structure containing the model state - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine adjt_pressure_precon_alg( modeldb, mesh, model_clock ) + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adjt_pressure_precon_alg( modeldb, mesh, model_clock, adj_lookup_table_cache ) implicit none - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Prognostic fields type(field_type), dimension(bundle_size) :: rhs @@ -152,7 +155,10 @@ contains call create_pressure_preconditioner( rhs, pressure_operator, pressure_preconditioner ) - call create_adj_pressure_preconditioner( rhs, adj_pressure_operator, adj_pressure_preconditioner ) + call create_adj_pressure_preconditioner( rhs, & + adj_lookup_table_cache, & + adj_pressure_operator, & + adj_pressure_preconditioner ) ! Size = 1 as only P field needed vector_x = r_solver_field_vector_type(1_i_def) diff --git a/applications/adjoint_tests/source/algorithm/solver/adjt_semi_implicit_solver_step_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/solver/adjt_semi_implicit_solver_step_alg_mod.x90 index 98d51e46f..3e61588ff 100644 --- a/applications/adjoint_tests/source/algorithm/solver/adjt_semi_implicit_solver_step_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/solver/adjt_semi_implicit_solver_step_alg_mod.x90 @@ -7,6 +7,7 @@ module adjt_semi_implicit_solver_step_alg_mod + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type use constants_mod, only: i_def, r_def, l_def, r_solver, EPS use log_mod, only: log_event, & log_scratch_space, & @@ -47,16 +48,18 @@ contains !> @brief Adjoint test for semi_implicit_solver_alg_mod subroutine step !> @details Does some setup, then calls the actual test via a private subroutine !! twice with different flag values - !> @param[in,out] modeldb Structure containing the model state - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine adjt_semi_implicit_solver_step_alg( modeldb, mesh, model_clock ) + !> @param[in,out] modeldb Structure containing the model state + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adjt_semi_implicit_solver_step_alg( modeldb, mesh, model_clock, adj_lookup_table_cache ) implicit none - type(modeldb_type), target, intent(inout) :: modeldb - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(modeldb_type), target, intent(inout) :: modeldb + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Prognostic fields type(field_type), dimension(bundle_size) :: state @@ -153,7 +156,7 @@ contains call compute_si_operators( ls_theta, ls_rho, ls_exner, & model_clock, ls_moist_dyn ) - call adj_semi_implicit_solver%initialise(rhs) + call adj_semi_implicit_solver%initialise(rhs, adj_lookup_table_cache) ! Set up moist_dyn_gas_law & mr call moist_dyn_gas_law%initialise(vector_space=vector_space_wtheta_ptr) diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_moist_mr_transport_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_moist_mr_transport_alg_mod.x90 index fe4808112..0f706f161 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_moist_mr_transport_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_moist_mr_transport_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for atl_moist_mr_transport_alg module atlt_moist_mr_transport_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -49,9 +50,10 @@ module atlt_moist_mr_transport_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products < Mx, Mx > and < AMx, x >, !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_moist_mr_transport_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_moist_mr_transport_alg( mesh, model_clock, adj_lookup_table_cache ) use tl_moist_mr_transport_alg_mod, only : tl_moist_mr_transport_alg use atl_moist_mr_transport_alg_mod, only : atl_moist_mr_transport_alg @@ -59,8 +61,9 @@ module atlt_moist_mr_transport_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type), dimension(:), allocatable :: mr_out @@ -202,8 +205,9 @@ module atlt_moist_mr_transport_alg_mod call wind_pc_dir_prod_rdef( inner1, pert_transport_controller, mesh_id, direction_3d ) ! Adjoint - call atl_moist_mr_transport_alg( mr_out, mr_in, ls_mr_in, & - nummr_to_transport, tl_transport_controller, transport_metadata ) + call atl_moist_mr_transport_alg( mr_out, mr_in, ls_mr_in, nummr_to_transport, & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) ! < AMx, x > inner2 = 0.0_r_def diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_theta_transport_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_theta_transport_alg_mod.x90 index 711799f0b..1b027ea72 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_theta_transport_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_theta_transport_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for atl_theta_transport_alg module atlt_theta_transport_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -48,9 +49,10 @@ module atlt_theta_transport_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_theta_transport_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_theta_transport_alg( mesh, model_clock, adj_lookup_table_cache ) use tl_theta_transport_alg_mod, only : tl_theta_transport_alg use atl_theta_transport_alg_mod, only : atl_theta_transport_alg @@ -58,8 +60,9 @@ module atlt_theta_transport_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: theta_out @@ -212,7 +215,8 @@ module atlt_theta_transport_alg_mod ! Adjoint call atl_theta_transport_alg( theta_out, theta_inc, theta_in, ls_theta_in, & - tl_transport_controller, transport_metadata ) + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( thout_thout_inp_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_control_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_control_alg_mod.x90 index 93f7e94aa..3ac396cab 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_control_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_control_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for atl_transport_control_alg module atlt_transport_control_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use field_mod, only : field_type use function_space_mod, only : function_space_type use constants_mod, only : r_def, i_def, l_def @@ -34,16 +35,18 @@ module atlt_transport_control_alg_mod !============================================================================= !> @brief Adjoint test for atl_transport_control_alg - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache !> - subroutine atlt_transport_control_alg( mesh, model_clock ) + subroutine atlt_transport_control_alg( mesh, model_clock, adj_lookup_table_cache ) implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Passive arguments for tl and adj calls type(field_type) :: ls_advected_fields(bundle_size) @@ -102,7 +105,8 @@ module atlt_transport_control_alg_mod ls_wind_n, & ls_mr_in, & model_clock, & - outer ) + outer, & + adj_lookup_table_cache ) end do @@ -119,6 +123,7 @@ module atlt_transport_control_alg_mod !> @param[in] ls_mr_in Linearisation state mixing ratios !> @param[in] model_clock The model clock !> @param[in] outer The outer iteration variable + !> @param[in] adj_lookup_table_cache Lookup table cache !> subroutine run_atlt_transport_control_alg( vector_space_wtheta_ptr, & vector_space_w2_ptr, & @@ -128,7 +133,8 @@ module atlt_transport_control_alg_mod ls_wind_n, & ls_mr_in, & model_clock, & - outer ) + outer, & + adj_lookup_table_cache ) use tl_transport_control_alg_mod, only : tl_transport_control_alg use atl_transport_control_alg_mod, only : atl_transport_control_alg @@ -145,6 +151,7 @@ module atlt_transport_control_alg_mod type(field_type), dimension(:), intent(in) :: ls_mr_in type(model_clock_type), intent(in) :: model_clock integer(kind=i_def), intent(in) :: outer + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Active arguments for tl and adj calls type(field_type) :: advection_inc(bundle_size) @@ -367,7 +374,7 @@ module atlt_transport_control_alg_mod wind_np1, wind_n, mr_out, mr_in, & ls_advected_fields, & ls_wind_np1, ls_wind_n, ls_mr_in, & - model_clock, outer ) + model_clock, outer, adj_lookup_table_cache ) ! < AMx, x > ai_ai_inp_inner_prod = 0.0_r_def diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_field_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_field_alg_mod.x90 index 6ec2d229b..182c70400 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_field_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_transport_field_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for atl_transport_field_alg module atlt_transport_field_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -53,9 +54,10 @@ module atlt_transport_field_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_transport_field_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_transport_field_alg( mesh, model_clock, adj_lookup_table_cache ) use tl_transport_field_mod, only : tl_transport_field use atl_transport_field_mod, only : atl_transport_field @@ -63,8 +65,9 @@ module atlt_transport_field_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: field_np1 @@ -176,7 +179,7 @@ module atlt_transport_field_alg_mod ! Initialise values and call the tangent-linear alg. call invoke( setval_random( field_np1 ), & - setval_random( field_n), & + setval_random( field_n ), & setval_x( field_np1_input, field_np1 ), & setval_x( field_n_input, field_n ), & setval_random( ls_field_n ) ) @@ -222,7 +225,8 @@ module atlt_transport_field_alg_mod ! Adjoint call atl_transport_field( & field_np1, field_n, ls_field_n, & - tl_transport_controller, transport_metadata & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache & ) ! < AMx, x > diff --git a/applications/adjoint_tests/source/algorithm/transport/control/atlt_wind_transport_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/control/atlt_wind_transport_alg_mod.x90 index 8fd27ff48..480c73a96 100644 --- a/applications/adjoint_tests/source/algorithm/transport/control/atlt_wind_transport_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/control/atlt_wind_transport_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for atl_wind_transport_alg module atlt_wind_transport_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -48,9 +49,10 @@ module atlt_wind_transport_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_wind_transport_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_wind_transport_alg( mesh, model_clock, adj_lookup_table_cache ) use tl_wind_transport_alg_mod, only : tl_wind_transport_alg use atl_wind_transport_alg_mod, only : atl_wind_transport_alg @@ -58,8 +60,9 @@ module atlt_wind_transport_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: rhs_u @@ -194,8 +197,9 @@ module atlt_wind_transport_alg_mod wn_wn_inp_inner_prod = 0.0_r_def ! Adjoint - call atl_wind_transport_alg( rhs_u, wind_n, ls_wind_n, & - tl_transport_controller, transport_metadata ) + call atl_wind_transport_alg( rhs_u, wind_n, ls_wind_n, & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( ru_ru_inp_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/adjt_reconstruct_w3_field_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/adjt_reconstruct_w3_field_alg_mod.x90 index 1ea49f961..164b3d534 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/adjt_reconstruct_w3_field_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/adjt_reconstruct_w3_field_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for adj_reconstruct_w3_field_alg module adjt_reconstruct_w3_field_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use field_mod, only : field_type use function_space_mod, only : function_space_type use constants_mod, only : r_def, i_def, l_def, EPS @@ -22,7 +23,6 @@ module adjt_reconstruct_w3_field_alg_mod use function_space_collection_mod, only : function_space_collection use transport_metadata_collection_mod, only : transport_metadata_collection use transport_metadata_mod, only : transport_metadata_type - use check_configuration_mod, only : get_required_stencil_depth implicit none @@ -36,9 +36,10 @@ module adjt_reconstruct_w3_field_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine adjt_hori_w3_reconstruct_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adjt_hori_w3_reconstruct_alg( mesh, model_clock, adj_lookup_table_cache ) use adj_reconstruct_w3_field_alg_mod, only : adj_hori_w3_reconstruct_alg use reconstruct_w3_field_alg_mod, only : hori_w3_reconstruct_alg @@ -46,8 +47,9 @@ module adjt_reconstruct_w3_field_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: field_new @@ -134,7 +136,8 @@ module adjt_reconstruct_w3_field_alg_mod ! Adjoint call adj_hori_w3_reconstruct_alg( field_new, field_old, & - transport_metadata ) + transport_metadata, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( field_new_field_new_input_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/adjt_wt_advective_update_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/adjt_wt_advective_update_alg_mod.x90 index ad3cc342a..0eb5cc146 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/adjt_wt_advective_update_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/adjt_wt_advective_update_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for adj_wt_advective_update_alg module adjt_wt_advective_update_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use field_mod, only : field_type use function_space_mod, only : function_space_type use mesh_mod, only : mesh_type @@ -35,9 +36,10 @@ module adjt_wt_advective_update_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine adjt_hori_wt_update_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adjt_hori_wt_update_alg( mesh, model_clock, adj_lookup_table_cache ) use wt_advective_update_alg_mod, only : hori_wt_update_alg use adj_wt_advective_update_alg_mod, only : adj_hori_wt_update_alg @@ -45,8 +47,9 @@ module adjt_wt_advective_update_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal arguments for forward and adjoint type(field_type) :: u_grad_f @@ -126,7 +129,7 @@ module adjt_wt_advective_update_alg_mod advective_advective_input_inner_prod = 0.0_r_def field_field_input_inner_prod = 0.0_r_def - call adj_hori_wt_update_alg( u_grad_f, ls_wind, ls_wind, field, transport_metadata ) + call adj_hori_wt_update_alg( u_grad_f, ls_wind, ls_wind, field, transport_metadata, adj_lookup_table_cache ) call invoke( x_innerproduct_y(advective_advective_input_inner_prod, u_grad_f, advective_input), & x_innerproduct_y(field_field_input_inner_prod, field, field_input) ) diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_advective_and_flux_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_advective_and_flux_alg_mod.x90 index 4362b3d3f..6082fa336 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_advective_and_flux_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_advective_and_flux_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for atl_advective_and_flux_alg module atlt_advective_and_flux_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -37,9 +38,10 @@ module atlt_advective_and_flux_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_advective_and_flux_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_advective_and_flux_alg( mesh, model_clock, adj_lookup_table_cache ) use atl_advective_and_flux_alg_mod, only : atl_advective_and_flux_alg use tl_advective_and_flux_alg_mod, only : tl_advective_and_flux_alg @@ -47,8 +49,9 @@ module atlt_advective_and_flux_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: mass_flux_1 @@ -216,7 +219,8 @@ module atlt_advective_and_flux_alg_mod density, wind, ls_density, ls_wind, & direction, transport_metadata, & final_rk_stage, dt, & - do_flux, do_advective ) + do_flux, do_advective, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( mass_flux_1_mass_flux_1_input_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_advective_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_advective_alg_mod.x90 index 02bb62f92..020220d98 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_advective_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_advective_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for atl_mol_advective_alg module atlt_mol_advective_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -46,9 +47,10 @@ module atlt_mol_advective_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_mol_advective_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_mol_advective_alg( mesh, model_clock, adj_lookup_table_cache ) use atl_mol_advective_alg_mod, only : atl_mol_advective_alg use tl_mol_advective_alg_mod, only : tl_mol_advective_alg @@ -56,8 +58,9 @@ module atlt_mol_advective_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: field_np1 @@ -168,7 +171,7 @@ module atlt_mol_advective_alg_mod field_field_input_inner_prod = 0.0_r_def ! Adjoint - call atl_mol_advective_alg( field_np1, field, ls_field, tl_transport_controller ) + call atl_mol_advective_alg( field_np1, field, ls_field, tl_transport_controller, adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( field_np1_field_np1_input_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_conservative_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_conservative_alg_mod.x90 index afd5534eb..2b5d89620 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_conservative_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_mol_conservative_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing adjoint test for atl_mol_conservative_alg module atlt_mol_conservative_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -56,9 +57,10 @@ module atlt_mol_conservative_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_mol_conservative_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_mol_conservative_alg( mesh, model_clock, adj_lookup_table_cache ) use atl_mol_conservative_alg_mod, only : atl_mol_conservative_alg use tl_mol_conservative_alg_mod, only : tl_mol_conservative_alg @@ -66,8 +68,9 @@ module atlt_mol_conservative_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: field_np1 @@ -222,7 +225,8 @@ module atlt_mol_conservative_alg_mod ! Adjoint call atl_mol_conservative_alg( field_np1, field, ls_field, & - tl_transport_controller ) + tl_transport_controller, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( field_np1_field_np1_input_inner_prod, & diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_reconstruct_w3_field_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_reconstruct_w3_field_alg_mod.x90 index d0aa73d2d..de518835c 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_reconstruct_w3_field_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_reconstruct_w3_field_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing handwritten adjoint test for atl_reconstruct_w3_field_alg module atlt_reconstruct_w3_field_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use field_mod, only : field_type use function_space_mod, only : function_space_type use constants_mod, only : r_def, i_def, l_def, EPS @@ -37,9 +38,10 @@ module atlt_reconstruct_w3_field_alg_mod !> @details Passes if adjoint is transpose of tangent linear. !> Determined by testing the equality of inner products and , !> where M is the tangent linear and A is the adjoint. - !> @param[in] mesh The model mesh - !> @param[in] model_clock The model clock - subroutine atlt_reconstruct_w3_field_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_reconstruct_w3_field_alg( mesh, model_clock, adj_lookup_table_cache ) use atl_reconstruct_w3_field_alg_mod, only : atl_reconstruct_w3_field_alg use tl_reconstruct_w3_field_alg_mod, only : tl_reconstruct_w3_field_alg @@ -47,8 +49,10 @@ module atlt_reconstruct_w3_field_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache + ! Arguments for tl and adj calls type(field_type) :: field_new @@ -143,8 +147,9 @@ module atlt_reconstruct_w3_field_alg_mod field_old_field_old_input_inner_prod = 0.0_r_def ! Adjoint - call atl_reconstruct_w3_field_alg( field_new, field_old, ls_field_old, & - direction, transport_metadata, final_rk_stage ) + call atl_reconstruct_w3_field_alg( field_new, field_old, ls_field_old, & + direction, transport_metadata, final_rk_stage, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( field_new_field_new_input_inner_prod, & @@ -216,7 +221,7 @@ module atlt_reconstruct_w3_field_alg_mod real(kind=r_def) :: field_old_field_old_input_inner_prod ! Test parameters and variables - real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def + real(kind=r_def), parameter :: overall_tolerance = 3000.0_r_def real(kind=r_def) :: machine_tol real(kind=r_def) :: relative_diff diff --git a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_wt_advective_update_alg_mod.x90 b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_wt_advective_update_alg_mod.x90 index 96fd2e926..a00003edc 100644 --- a/applications/adjoint_tests/source/algorithm/transport/mol/atlt_wt_advective_update_alg_mod.x90 +++ b/applications/adjoint_tests/source/algorithm/transport/mol/atlt_wt_advective_update_alg_mod.x90 @@ -6,6 +6,7 @@ !> @brief Module containing handwritten adjoint test for atl_wt_advective_update_alg_mod routines module atlt_wt_advective_update_alg_mod + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use r_tran_field_mod, only : r_tran_field_type use field_mod, only : field_type use function_space_mod, only : function_space_type @@ -43,7 +44,10 @@ module atlt_wt_advective_update_alg_mod !> Determined by testing the equality of inner products !> < Mx, Mx > and < AMx, x >, where M is the tangent linear !> and A is the adjoint. - subroutine atlt_wt_advective_update_alg( mesh, model_clock ) + !> @param[in] mesh The model mesh + !> @param[in] model_clock The model clock + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atlt_wt_advective_update_alg( mesh, model_clock, adj_lookup_table_cache ) use atl_wt_advective_update_alg_mod, only : atl_wt_advective_update_alg use tl_wt_advective_update_alg_mod, only : tl_wt_advective_update_alg @@ -51,8 +55,9 @@ module atlt_wt_advective_update_alg_mod implicit none ! Arguments - type(mesh_type), pointer, intent(in) :: mesh - type(model_clock_type), intent(in) :: model_clock + type(mesh_type), pointer, intent(in) :: mesh + type(model_clock_type), intent(in) :: model_clock + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Arguments for tl and adj calls type(field_type) :: rhs @@ -177,10 +182,11 @@ module atlt_wt_advective_update_alg_mod wind_wind_input_inner_prod = 0.0_r_def ! Adjoint - call atl_wt_advective_update_alg( rhs, adv_field, wind, & - ls_adv_field, ls_wind, & - dt, direction, & - transport_metadata, final_rk_stage ) + call atl_wt_advective_update_alg( rhs, adv_field, wind, & + ls_adv_field, ls_wind, & + dt, direction, & + transport_metadata, final_rk_stage, & + adj_lookup_table_cache ) ! < AMx, x > call invoke( x_innerproduct_y( rhs_rhs_input_inner_prod, & diff --git a/applications/adjoint_tests/source/driver/adjoint_test_driver_mod.f90 b/applications/adjoint_tests/source/driver/adjoint_test_driver_mod.f90 index f9d458c4d..9f426f45d 100644 --- a/applications/adjoint_tests/source/driver/adjoint_test_driver_mod.f90 +++ b/applications/adjoint_tests/source/driver/adjoint_test_driver_mod.f90 @@ -56,6 +56,9 @@ subroutine run( modeldb ) use adjt_poly_adv_upd_lookup_alg_mod, only : adjt_poly_adv_upd_lookup_alg use adjt_w3h_adv_upd_lookup_alg_mod, only : adjt_w3h_adv_upd_lookup_alg + ! ./linear_physics + use atlt_bl_inc_alg_mod, only : atlt_bl_inc_alg + ! Handwritten algorithm tests ! ./interpolation use adjt_interpolation_alg_mod, only : adjt_interp_w3wth_to_w2_alg, & @@ -105,6 +108,9 @@ subroutine run( modeldb ) use adjt_mixed_solver_alg_mod, only : adjt_mixed_solver_alg use adjt_semi_implicit_solver_step_alg_mod, only : adjt_semi_implicit_solver_step_alg + ! ./linear_physics + use atlt_bdy_lyr_alg_mod, only : atlt_bdy_lyr_alg + ! ./timestepping use atlt_si_timestep_alg_mod, only : atlt_si_timestep_alg @@ -147,6 +153,9 @@ subroutine run( modeldb ) ! ./core_dynamics call atlt_pressure_gradient_bd_alg( mesh ) + ! ./linear_physics + call atlt_bl_inc_alg( mesh ) + ! ./inter_function_space call adjt_sci_convert_hdiv_field_alg( mesh, chi, panel_id ) @@ -168,26 +177,26 @@ subroutine run( modeldb ) call atlt_end_con_step_alg( mesh, modeldb%clock ) ! ./transport/mol - call adjt_hori_w3_reconstruct_alg( mesh, modeldb%clock ) + call adjt_hori_w3_reconstruct_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) call atlt_vert_w3_reconstruct_alg( mesh, modeldb%clock ) - call atlt_reconstruct_w3_field_alg( mesh, modeldb%clock ) + call atlt_reconstruct_w3_field_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) call atlt_hori_wt_update_alg( mesh, modeldb%clock ) call atlt_vert_wt_update_alg( mesh, modeldb%clock ) - call adjt_hori_wt_update_alg( mesh, modeldb%clock ) - call atlt_wt_advective_update_alg( mesh, modeldb%clock ) - call atlt_advective_and_flux_alg( mesh, modeldb%clock ) - call atlt_mol_conservative_alg( mesh, modeldb%clock ) - call atlt_mol_advective_alg( mesh, modeldb%clock ) + call adjt_hori_wt_update_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_wt_advective_update_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_advective_and_flux_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_mol_conservative_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_mol_advective_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) ! ./transport/control - call atlt_transport_field_alg( mesh, modeldb%clock ) - call atlt_wind_transport_alg( mesh, modeldb%clock ) - call atlt_moist_mr_transport_alg( mesh, modeldb%clock ) - call atlt_theta_transport_alg( mesh, modeldb%clock ) + call atlt_transport_field_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_wind_transport_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_moist_mr_transport_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) + call atlt_theta_transport_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) call adjt_ls_wind_pert_rho_initialiser_alg( mesh, modeldb%clock ) call adjt_pert_wind_ls_rho_initialiser_alg( mesh, modeldb%clock ) call atlt_transport_controller_initialiser_alg( mesh, modeldb%clock ) - call atlt_transport_control_alg( mesh, modeldb%clock ) + call atlt_transport_control_alg( mesh, modeldb%clock, adj_trans_lookup_cache ) ! ./core_dynamics call atlt_rhs_alg( mesh, modeldb%clock ) @@ -195,12 +204,15 @@ subroutine run( modeldb ) call atlt_derive_exner_from_eos_alg( mesh ) call atlt_moist_dyn_factors_alg( mesh ) + ! ./linear_physics + call atlt_bdy_lyr_alg( modeldb, mesh ) + ! ./solver - call adjt_pressure_precon_alg( modeldb, mesh, modeldb%clock ) + call adjt_pressure_precon_alg( modeldb, mesh, modeldb%clock, adj_solver_lookup_cache ) call adjt_mixed_operator_alg( mesh, modeldb%clock ) - call adjt_mixed_schur_preconditioner_alg( modeldb, mesh, modeldb%clock ) - call adjt_mixed_solver_alg( modeldb, mesh, modeldb%clock ) - call adjt_semi_implicit_solver_step_alg( modeldb, mesh, modeldb%clock ) + call adjt_mixed_schur_preconditioner_alg( modeldb, mesh, modeldb%clock, adj_solver_lookup_cache ) + call adjt_mixed_solver_alg( modeldb, mesh, modeldb%clock, adj_solver_lookup_cache ) + call adjt_semi_implicit_solver_step_alg( modeldb, mesh, modeldb%clock, adj_solver_lookup_cache ) ! ./timestepping call atlt_si_timestep_alg( modeldb, mesh, twod_mesh, 1 ) diff --git a/applications/gravity_wave/rose-meta/lfric-gravity_wave/version30_31.py b/applications/gravity_wave/rose-meta/lfric-gravity_wave/version30_31.py new file mode 100644 index 000000000..700307114 --- /dev/null +++ b/applications/gravity_wave/rose-meta/lfric-gravity_wave/version30_31.py @@ -0,0 +1,207 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/gravity_wave/rose-meta/lfric-gravity_wave/vn3.1/rose-meta.conf new file mode 100644 index 000000000..ae73c5287 --- /dev/null +++ b/applications/gravity_wave/rose-meta/lfric-gravity_wave/vn3.1/rose-meta.conf @@ -0,0 +1,31 @@ +import=lfric-gungho/vn3.1 + +[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/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 b/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 index 46b88ddad..0526e935b 100644 --- a/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 +++ b/applications/gravity_wave/source/driver/gravity_wave_infrastructure_mod.f90 @@ -10,7 +10,6 @@ module gravity_wave_infrastructure_mod use add_mesh_map_mod, only : assign_mesh_maps use driver_modeldb_mod, only : modeldb_type - use check_configuration_mod, only : get_required_stencil_depth use constants_mod, only : i_def, & PRECISION_REAL, & r_def, r_second, & @@ -81,7 +80,8 @@ subroutine initialise_infrastructure( program_name, & logical(l_def) :: prepartitioned logical :: apply_partition_check - integer(i_def) :: stencil_depth + integer(i_def) :: stencil_depth(1) + integer(i_def) :: geometry integer(i_def) :: method integer(i_def) :: number_of_layers @@ -191,7 +191,7 @@ subroutine initialise_infrastructure( program_name, & !======================================================================= ! 1.3 Initialise mesh objects and assign InterGrid maps !======================================================================= - stencil_depth = get_required_stencil_depth() + stencil_depth = 2 apply_partition_check = .false. if ( .not. prepartitioned .and. l_multigrid ) then apply_partition_check = .true. @@ -237,6 +237,9 @@ subroutine initialise_infrastructure( program_name, & nullify(chi_inventory, panel_id_inventory) deallocate(base_mesh_names) + deallocate(twod_names) + deallocate(extrusion) + deallocate(extrusion_2d) end subroutine initialise_infrastructure diff --git a/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf b/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf index 8a3ca705d..be9f43f92 100644 --- a/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf +++ b/applications/gravity_wave/unit-test/kernel/initial_buoyancy_kernel_mod_test.pf @@ -77,7 +77,7 @@ contains p_zero=100000.0_r_def, & scaling_factor=1.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/applications/gungho_model/optimisation/uoe-dial3 b/applications/gungho_model/optimisation/uoe-dial3 new file mode 120000 index 000000000..e5b7210c6 --- /dev/null +++ b/applications/gungho_model/optimisation/uoe-dial3 @@ -0,0 +1 @@ +meto-ex1a \ No newline at end of file diff --git a/applications/gungho_model/optimisation/uoe-dial3/psykal/global.py b/applications/gungho_model/optimisation/uoe-dial3/psykal/global.py deleted file mode 100644 index 125a77f40..000000000 --- a/applications/gungho_model/optimisation/uoe-dial3/psykal/global.py +++ /dev/null @@ -1,32 +0,0 @@ -############################################################################## -# Copyright (c) 2017, Met Office, on behalf of HMSO and Queen's Printer -# For further details please refer to the file LICENCE.original which you -# should have received as part of this distribution. -############################################################################## - - -''' -PSyclone transformation script for the LFRic (Dynamo0p3) API to apply -colouring, OpenMP and redundant computation to the level-1 halo for -the initialisation built-ins generically. - -''' - -from psyclone_tools import (redundant_computation_setval, colour_loops, - openmp_parallelise_loops, - view_transformed_schedule) - - -def trans(psyir): - ''' - Applies PSyclone colouring, OpenMP and redundant computation - transformations. - - :param psyir: the PSyIR of the PSyIR-layer. - :type psyir: :py:class:`psyclone.psyir.nodes.FileContainer` - - ''' - redundant_computation_setval(psyir) - colour_loops(psyir) - openmp_parallelise_loops(psyir) - view_transformed_schedule(psyir) diff --git a/applications/gungho_model/optimisation/uoe-epic b/applications/gungho_model/optimisation/uoe-epic new file mode 120000 index 000000000..e5b7210c6 --- /dev/null +++ b/applications/gungho_model/optimisation/uoe-epic @@ -0,0 +1 @@ +meto-ex1a \ No newline at end of file diff --git a/applications/gungho_model/optimisation/uoe-epic/psykal/global.py b/applications/gungho_model/optimisation/uoe-epic/psykal/global.py deleted file mode 100644 index 125a77f40..000000000 --- a/applications/gungho_model/optimisation/uoe-epic/psykal/global.py +++ /dev/null @@ -1,32 +0,0 @@ -############################################################################## -# Copyright (c) 2017, Met Office, on behalf of HMSO and Queen's Printer -# For further details please refer to the file LICENCE.original which you -# should have received as part of this distribution. -############################################################################## - - -''' -PSyclone transformation script for the LFRic (Dynamo0p3) API to apply -colouring, OpenMP and redundant computation to the level-1 halo for -the initialisation built-ins generically. - -''' - -from psyclone_tools import (redundant_computation_setval, colour_loops, - openmp_parallelise_loops, - view_transformed_schedule) - - -def trans(psyir): - ''' - Applies PSyclone colouring, OpenMP and redundant computation - transformations. - - :param psyir: the PSyIR of the PSyIR-layer. - :type psyir: :py:class:`psyclone.psyir.nodes.FileContainer` - - ''' - redundant_computation_setval(psyir) - colour_loops(psyir) - openmp_parallelise_loops(psyir) - view_transformed_schedule(psyir) diff --git a/applications/gungho_model/rose-meta/lfric-gungho_model/version30_31.py b/applications/gungho_model/rose-meta/lfric-gungho_model/version30_31.py new file mode 100644 index 000000000..cc668fd4b --- /dev/null +++ b/applications/gungho_model/rose-meta/lfric-gungho_model/version30_31.py @@ -0,0 +1,207 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/gungho_model/rose-meta/lfric-gungho_model/vn3.1/rose-meta.conf new file mode 100644 index 000000000..47acbb91f --- /dev/null +++ b/applications/gungho_model/rose-meta/lfric-gungho_model/vn3.1/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-gungho/vn3.1 diff --git a/applications/jedi_lfric_tests/example/configuration.nml b/applications/jedi_lfric_tests/example/configuration.nml index 2f6a4428d..ab6828519 100644 --- a/applications/jedi_lfric_tests/example/configuration.nml +++ b/applications/jedi_lfric_tests/example/configuration.nml @@ -68,8 +68,8 @@ stretching_method='smooth', ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='restart', diag_stem_name='diagGungho', -ls_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', -ls_filename='final_ls', +ls_directory='/data/users/lfricadmin/data/tangent-linear/PullRequest182' +ls_filename='final_ls_with_land', orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', start_dump_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354', start_dump_filename='final_pert', @@ -221,11 +221,12 @@ write_minmax_tseries=.false., / &linear fixed_ls=.true., -l_stabilise_bl=.true., +l_stabilise_bl=.false., ls_read_w2h=.false., max_bl_stabilisation=0.75, n_bl_levels_to_stabilise=15, pert_option='file', +transport_efficiency=.true., / &logging log_to_rank_zero_only=.false., @@ -274,11 +275,16 @@ panel_yproc=1, partitioner='cubedsphere', / &physics -configure_segments=.false., +bl_segment=0, +configure_segments=.true., +conv_gr_segment=16, +gw_segment=0, limit_drag_incs=.false., +ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., sample_physics_winds_correction=.false., +ussp_segment=0, / &planet cp=1005.0, @@ -354,7 +360,7 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_tracer_equation=.false. +adjust_tracer_equation=.false., adjust_vhv_wind=.false., ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/jedi_lfric_tests/example/iodef.xml b/applications/jedi_lfric_tests/example/iodef.xml index 35abc4664..90edb87ac 100644 --- a/applications/jedi_lfric_tests/example/iodef.xml +++ b/applications/jedi_lfric_tests/example/iodef.xml @@ -50,6 +50,11 @@ + + + + + @@ -331,6 +336,7 @@ + diff --git a/applications/jedi_lfric_tests/example_forecast/configuration.nml b/applications/jedi_lfric_tests/example_forecast/configuration.nml index 17bb72453..220c17be0 100644 --- a/applications/jedi_lfric_tests/example_forecast/configuration.nml +++ b/applications/jedi_lfric_tests/example_forecast/configuration.nml @@ -7,7 +7,7 @@ test_field='theta', &jedi_geometry io_calender_start='2018-04-14T21:00:00', io_path_inc_read='', -io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', +io_path_state_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', io_path_state_write='write_file', io_setup_increment=.false., io_time_step='P0DT1H0M0S', diff --git a/applications/jedi_lfric_tests/example_forecast_pseudo/configuration.nml b/applications/jedi_lfric_tests/example_forecast_pseudo/configuration.nml index 9447dfff7..f3a627297 100644 --- a/applications/jedi_lfric_tests/example_forecast_pseudo/configuration.nml +++ b/applications/jedi_lfric_tests/example_forecast_pseudo/configuration.nml @@ -10,7 +10,7 @@ forecast_length='P0DT6H0M0S', &jedi_geometry io_calender_start='2018-04-14T21:00:00', io_path_inc_read='', -io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', +io_path_state_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', io_path_state_write='write_file', io_setup_increment=.false., io_time_step='P0DT1H0M0S', @@ -52,6 +52,9 @@ element_order_h=0, element_order_v=0, rehabilitate=.true., / +&formulation +use_multires_coupling=.false., +/ &io file_convention='UGRID', / @@ -68,3 +71,12 @@ scaling_factor=1.0, &time calendar_type='gregorian', / +&transport +dep_pt_stencil_extent=3, +ffsl_inner_order=0, +ffsl_outer_order=1, +fv_horizontal_order=2, +operators='fv', +panel_edge_high_order=.false., +panel_edge_treatment='none', +/ diff --git a/applications/jedi_lfric_tests/example_forecast_pseudo/configuration_op.nml b/applications/jedi_lfric_tests/example_forecast_pseudo/configuration_op.nml index c179e76eb..e392cbdd7 100644 --- a/applications/jedi_lfric_tests/example_forecast_pseudo/configuration_op.nml +++ b/applications/jedi_lfric_tests/example_forecast_pseudo/configuration_op.nml @@ -10,7 +10,7 @@ forecast_length='P0DT6H0M0S', &jedi_geometry io_calender_start='2018-04-14T21:00:00', io_path_inc_read='', -io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', +io_path_state_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', io_path_state_write='write_file', io_setup_increment=.false., io_time_step='P0DT1H0M0S', diff --git a/applications/jedi_lfric_tests/example_forecast_pseudo/iodef.xml b/applications/jedi_lfric_tests/example_forecast_pseudo/iodef.xml index 313c27826..5aade9f56 100644 --- a/applications/jedi_lfric_tests/example_forecast_pseudo/iodef.xml +++ b/applications/jedi_lfric_tests/example_forecast_pseudo/iodef.xml @@ -47,7 +47,7 @@ - + @@ -61,7 +61,7 @@ - + diff --git a/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml b/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml index 08db65a7f..e1a1eca60 100644 --- a/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml +++ b/applications/jedi_lfric_tests/example_id_tlm_tests/configuration.nml @@ -12,8 +12,8 @@ io_time_step='P0DT1H0M0S', &jedi_state state_time='2018-04-14 21:00:00', use_pseudo_model=.true., -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', -'m_v','m_cl','m_r','m_s', +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', +'m_cl','m_r','m_s','land_fraction', / &jedi_increment inc_time='2018-04-14 21:00:00', @@ -31,6 +31,7 @@ number_of_steps=9, time_step='P0DT1H0M0S', / &jedi_lfric_settings +adjoint_test_tolerance=1.0e-4, forecast_length='P0DT6H0M0S', / &base_mesh @@ -253,11 +254,23 @@ write_minmax_tseries=.false., / &linear fixed_ls=.true., -l_stabilise_bl=.true., +l_stabilise_bl=.false., ls_read_w2h=.false., max_bl_stabilisation=0.75, n_bl_levels_to_stabilise=15, pert_option='file', +transport_efficiency=.true., +/ +&linear_physics +blevs_m=15, +e_folding_levs_m=10, +l_0_m=80.0, +l_boundary_layer=.true., +log_layer=2, +u_land_m=0.4, +u_sea_m=0.4, +z_land_m=0.05, +z_sea_m=0.0005, / &logging log_to_rank_zero_only=.false., @@ -306,11 +319,16 @@ panel_yproc=1, partitioner='cubedsphere', / &physics -configure_segments=.false., +bl_segment=0, +configure_segments=.true., +conv_gr_segment=16, +gw_segment=0, limit_drag_incs=.false., +ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., sample_physics_winds_correction=.false., +ussp_segment=0, / &planet cp=1005.0, @@ -386,7 +404,7 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_tracer_equation=.false. +adjust_tracer_equation=.false., adjust_vhv_wind=.false., ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/jedi_lfric_tests/example_id_tlm_tests/iodef.xml b/applications/jedi_lfric_tests/example_id_tlm_tests/iodef.xml index d6aa75925..4a65814b5 100644 --- a/applications/jedi_lfric_tests/example_id_tlm_tests/iodef.xml +++ b/applications/jedi_lfric_tests/example_id_tlm_tests/iodef.xml @@ -41,6 +41,7 @@ + @@ -55,6 +56,7 @@ + @@ -144,6 +146,11 @@ + + + + + @@ -425,6 +432,7 @@ + diff --git a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml index 3d2116c31..3ea39dd10 100644 --- a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml +++ b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration.nml @@ -6,18 +6,18 @@ io_calender_start='2018-04-14T21:00:00', io_path_inc_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', io_path_state_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', io_path_state_write='write_file', -io_setup_increment=.true., +io_setup_increment=.false., io_time_step='P0DT1H0M0S', / &jedi_state state_time='2018-04-14 21:00:00', use_pseudo_model=.true., -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', -'m_v','m_cl','m_r','m_s', +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', +'m_cl','m_r','m_s','land_fraction', / &jedi_increment inc_time='2018-04-14 21:00:00', -initialise_via_read=.true., +initialise_via_read=.false., variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', 'm_cl','m_r','m_s', / @@ -254,11 +254,23 @@ write_minmax_tseries=.false., / &linear fixed_ls=.true., -l_stabilise_bl=.true., +l_stabilise_bl=.false., ls_read_w2h=.false., max_bl_stabilisation=0.75, n_bl_levels_to_stabilise=15, pert_option='file', +transport_efficiency=.true., +/ +&linear_physics +blevs_m=15, +e_folding_levs_m=10, +l_0_m=80.0, +l_boundary_layer=.true., +log_layer=2, +u_land_m=0.4, +u_sea_m=0.4, +z_land_m=0.05, +z_sea_m=0.0005, / &logging log_to_rank_zero_only=.false., @@ -307,11 +319,16 @@ panel_yproc=1, partitioner='cubedsphere', / &physics -configure_segments=.false., +bl_segment=0, +configure_segments=.true., +conv_gr_segment=16, +gw_segment=0, limit_drag_incs=.false., +ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., sample_physics_winds_correction=.false., +ussp_segment=0, / &planet cp=1005.0, @@ -387,7 +404,7 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_tracer_equation=.false. +adjust_tracer_equation=.false., adjust_vhv_wind=.false., ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml index 862b1278c..f472b5066 100644 --- a/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml +++ b/applications/jedi_lfric_tests/example_tlm_forecast_tl/configuration_op.nml @@ -6,8 +6,8 @@ test_field='theta', &jedi_geometry io_calender_start='2018-04-14T21:00:00', -io_path_inc_read='/data/users/lfric/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', -io_path_state_read='/data/users/lfric/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', +io_path_inc_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/pert_fields/lfric_diag', +io_path_state_read='/data/users/lfricadmin/data/jedi-lfric/Ticket354/ls_fields/jedi_trajectory', io_path_state_write='write_file', io_setup_increment=.true., io_time_step='P0DT1H0M0S', @@ -96,7 +96,7 @@ stretching_height=17507.0, stretching_method='smooth', / &files -ancil_directory='/data/users/lfric/data/ancils/basic-gal/yak/C12', +ancil_directory='/data/users/lfricadmin/data/ancils/basic-gal/yak/C12', checkpoint_stem_name='', diag_stem_name='', orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog', diff --git a/applications/jedi_lfric_tests/example_tlm_forecast_tl/iodef.xml b/applications/jedi_lfric_tests/example_tlm_forecast_tl/iodef.xml index a6e761ac9..4a65814b5 100644 --- a/applications/jedi_lfric_tests/example_tlm_forecast_tl/iodef.xml +++ b/applications/jedi_lfric_tests/example_tlm_forecast_tl/iodef.xml @@ -41,13 +41,14 @@ + - + @@ -55,13 +56,14 @@ + - + @@ -74,7 +76,7 @@ - + @@ -144,6 +146,11 @@ + + + + + @@ -400,7 +407,7 @@ - + @@ -425,6 +432,7 @@ + diff --git a/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml b/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml index 0da97698c..da9b864b8 100644 --- a/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml +++ b/applications/jedi_lfric_tests/example_tlm_tests/configuration.nml @@ -12,8 +12,8 @@ io_time_step='P0DT1H0M0S', &jedi_state state_time='2018-04-14 21:00:00', use_pseudo_model=.true., -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', -'m_v','m_cl','m_r','m_s', +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', +'m_cl','m_r','m_s','land_fraction', / &jedi_increment inc_time='2018-04-14 21:00:00', @@ -31,7 +31,7 @@ number_of_steps=9, time_step='P0DT1H0M0S', / &jedi_lfric_settings -adjoint_test_tolerance=1.0e-3, +adjoint_test_tolerance=1.0e-2, forecast_length='P0DT6H0M0S', / &base_mesh @@ -254,11 +254,23 @@ write_minmax_tseries=.false., / &linear fixed_ls=.true., -l_stabilise_bl=.true., +l_stabilise_bl=.false., ls_read_w2h=.false., max_bl_stabilisation=0.75, n_bl_levels_to_stabilise=15, pert_option='file', +transport_efficiency=.true., +/ +&linear_physics +blevs_m=15, +e_folding_levs_m=10, +l_0_m=80.0, +l_boundary_layer=.true., +log_layer=2, +u_land_m=0.4, +u_sea_m=0.4, +z_land_m=0.05, +z_sea_m=0.0005, / &logging log_to_rank_zero_only=.false., @@ -307,11 +319,16 @@ panel_yproc=1, partitioner='cubedsphere', / &physics -configure_segments=.false., +bl_segment=0, +configure_segments=.true., +conv_gr_segment=16, +gw_segment=0, limit_drag_incs=.false., +ls_ppn_segment=0, sample_physics_scalars=.true., sample_physics_winds=.true., sample_physics_winds_correction=.false., +ussp_segment=0, / &planet cp=1005.0, @@ -387,7 +404,7 @@ tau_u=0.55, / &transport adjust_theta=.false., -adjust_tracer_equation=.false. +adjust_tracer_equation=.false., adjust_vhv_wind=.false., ageofair_reset_level=10, broken_w2_projection=.false., diff --git a/applications/jedi_lfric_tests/example_tlm_tests/iodef.xml b/applications/jedi_lfric_tests/example_tlm_tests/iodef.xml index d6aa75925..4a65814b5 100644 --- a/applications/jedi_lfric_tests/example_tlm_tests/iodef.xml +++ b/applications/jedi_lfric_tests/example_tlm_tests/iodef.xml @@ -41,6 +41,7 @@ + @@ -55,6 +56,7 @@ + @@ -144,6 +146,11 @@ + + + + + @@ -425,6 +432,7 @@ + diff --git a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 index 9748e3f94..a62b68ecb 100644 --- a/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 +++ b/applications/jedi_lfric_tests/integration-test/algorithm/algorithm_test.f90 @@ -69,7 +69,7 @@ program algorithm_test logical(l_def) :: apply_partition_check integer(i_def) :: geometry - integer(i_def) :: stencil_depth + integer(i_def) :: stencil_depth(1) integer(i_def) :: method integer(i_def) :: number_of_layers real(r_def) :: domain_bottom diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_common/version30_31.py b/applications/jedi_lfric_tests/rose-meta/jedi_common/version30_31.py new file mode 100644 index 000000000..8d220cefa --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_common/version30_31.py @@ -0,0 +1,300 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t182" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_common/vn3.1/rose-meta.conf new file mode 100644 index 000000000..d8596029b --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_common/vn3.1/rose-meta.conf @@ -0,0 +1,158 @@ +import=lfric-adjoint/vn3.1 + +#============================================================================== +# 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=adjoint_test_tolerance] +compulsory=false +description=Tolerance for inner product adjoint tests in jedi_tlm_tests +help=Set as appropriate based on configuration +!kind=default +sort-key= +type=real + +[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/version30_31.py b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/version30_31.py new file mode 100644 index 000000000..298dcf28c --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/version30_31.py @@ -0,0 +1,302 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t182" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/vn3.1/rose-meta.conf new file mode 100644 index 000000000..d191bf9f1 --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/vn3.1/rose-meta.conf @@ -0,0 +1,18 @@ +import=jedi_common/vn3.1 + +#============================================================================== +# 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/version30_31.py b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/version30_31.py new file mode 100644 index 000000000..76f100e30 --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/version30_31.py @@ -0,0 +1,302 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t182" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/vn3.1/rose-meta.conf new file mode 100644 index 000000000..8dd6d6593 --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast_pseudo/vn3.1/rose-meta.conf @@ -0,0 +1 @@ +import=jedi_common/vn3.1 diff --git a/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/version30_31.py b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/version30_31.py new file mode 100644 index 000000000..8307c6c78 --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/version30_31.py @@ -0,0 +1,302 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t182" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/vn3.1/rose-meta.conf new file mode 100644 index 000000000..d278ae7ff --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_id_tlm_tests/vn3.1/rose-meta.conf @@ -0,0 +1,28 @@ +import=jedi_common/vn3.1 + +#============================================================================== +# 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/version30_31.py b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/version30_31.py new file mode 100644 index 000000000..9924ff413 --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/version30_31.py @@ -0,0 +1,302 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t182" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/vn3.1/rose-meta.conf new file mode 100644 index 000000000..f19808878 --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_lfric_tests/vn3.1/rose-meta.conf @@ -0,0 +1,93 @@ +import=jedi_common/vn3.1 + +[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/version30_31.py b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/version30_31.py new file mode 100644 index 000000000..e4395c289 --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/version30_31.py @@ -0,0 +1,302 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t182" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/vn3.1/rose-meta.conf new file mode 100644 index 000000000..d278ae7ff --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_forecast_tl/vn3.1/rose-meta.conf @@ -0,0 +1,28 @@ +import=jedi_common/vn3.1 + +#============================================================================== +# 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/version30_31.py b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/version30_31.py new file mode 100644 index 000000000..d661801d8 --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/version30_31.py @@ -0,0 +1,302 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t132(MacroUpgrade): + """Upgrade macro for ticket #132 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t132" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jedi_common + self.add_setting( + config, + ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], + "1.0e-4", + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t132" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t182" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/vn3.1/rose-meta.conf new file mode 100644 index 000000000..9a6cbe17d --- /dev/null +++ b/applications/jedi_lfric_tests/rose-meta/jedi_tlm_tests/vn3.1/rose-meta.conf @@ -0,0 +1,25 @@ +import=jedi_common/vn3.1 + +[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/source/jedi-interface/jedi_geometry_mod.f90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_geometry_mod.f90 index 4fd1b473b..bebc16e4e 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_geometry_mod.f90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_geometry_mod.f90 @@ -94,7 +94,6 @@ module jedi_geometry_mod !> subroutine initialise( self, mpi_comm, configuration ) ! Access config directly until modeldb ready - use driver_mesh_mod, only: init_mesh use driver_config_mod, only: init_config use jedi_lfric_mesh_setup_mod, only: initialise_mesh use jedi_lfric_tests_mod, only: jedi_lfric_tests_required_namelists diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_id_linear_model_mod.f90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_id_linear_model_mod.f90 index 4cf75379e..2cc8af089 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_id_linear_model_mod.f90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_id_linear_model_mod.f90 @@ -34,6 +34,7 @@ module jedi_id_linear_model_mod use jedi_base_linear_model_mod, only : jedi_base_linear_model_type use jedi_lfric_duration_mod, only : jedi_duration_type use jedi_lfric_linear_fields_mod, only : variable_names, & + ls_variable_names, & create_linear_fields use jedi_lfric_wind_fields_mod, only : create_scalar_winds, & setup_vector_wind @@ -184,10 +185,10 @@ subroutine set_trajectory( self, jedi_state ) ! Create field collection that contains the linear state fields ! without "ls_" prepended. - call create_linear_fields(jedi_state%geometry%get_mesh(), next_linear_state) + call create_linear_fields(jedi_state%geometry%get_mesh(), jedi_state%geometry%get_twod_mesh(), next_linear_state) ! Copy data from the input state into next_linear_state - call jedi_state%get_to_field_collection( variable_names, & + call jedi_state%get_to_field_collection( ls_variable_names, & next_linear_state ) ! Create W2 wind, interpolate from scaler winds (W3/Wtheta) then diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_linear_model_mod.f90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_linear_model_mod.f90 index 6be770327..797201121 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_linear_model_mod.f90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_linear_model_mod.f90 @@ -39,6 +39,7 @@ module jedi_linear_model_mod zero_moist_fields use jedi_lfric_duration_mod, only : jedi_duration_type use jedi_lfric_linear_fields_mod, only : variable_names, & + ls_variable_names, & create_linear_fields use jedi_lfric_wind_fields_mod, only : create_scalar_winds, & setup_vector_wind @@ -182,10 +183,10 @@ subroutine set_trajectory( self, jedi_state ) ! Create field collection that contains the linear state fields ! without "ls_" prepended. - call create_linear_fields(jedi_state%geometry%get_mesh(), next_linear_state) + call create_linear_fields(jedi_state%geometry%get_mesh(), jedi_state%geometry%get_twod_mesh(), next_linear_state) ! Copy data from the input state into next_linear_state - call jedi_state%get_to_field_collection( variable_names, & + call jedi_state%get_to_field_collection( ls_variable_names, & next_linear_state ) ! Create W2 wind, interpolate from scaler winds (W3/Wtheta) then diff --git a/applications/jedi_lfric_tests/source/jedi-interface/jedi_setup_field_meta_data_mod.F90 b/applications/jedi_lfric_tests/source/jedi-interface/jedi_setup_field_meta_data_mod.F90 index c8d0c0f0a..34dd084dc 100644 --- a/applications/jedi_lfric_tests/source/jedi-interface/jedi_setup_field_meta_data_mod.F90 +++ b/applications/jedi_lfric_tests/source/jedi-interface/jedi_setup_field_meta_data_mod.F90 @@ -108,6 +108,9 @@ subroutine get_field_info(function_space, is_2d, variable_name) case ( "u10m" ) function_space = W3 is_2d = .true. + case ( "land_fraction" ) + function_space = W3 + is_2d = .true. case default write ( log_scratch_space, '(4A)' ) & "jedi_setup_field_meta_data_mod::get_field_info:: ", & diff --git a/applications/jules/build/compile_options.mk b/applications/jules/build/compile_options.mk index bf4bad539..3ab2dcbf3 100644 --- a/applications/jules/build/compile_options.mk +++ b/applications/jules/build/compile_options.mk @@ -13,7 +13,8 @@ $(info UM physics specific compile options) include $(PROJECT_DIR)/build/fortran/$(FORTRAN_COMPILER).mk -science/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +casim/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +ukca/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) jules/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) socrates/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) legacy/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) diff --git a/applications/jules/optimisation/uoe-dial3 b/applications/jules/optimisation/uoe-dial3 new file mode 120000 index 000000000..e5b7210c6 --- /dev/null +++ b/applications/jules/optimisation/uoe-dial3 @@ -0,0 +1 @@ +meto-ex1a \ No newline at end of file diff --git a/applications/jules/optimisation/uoe-dial3/psykal/global.py b/applications/jules/optimisation/uoe-dial3/psykal/global.py deleted file mode 100644 index 952b2d506..000000000 --- a/applications/jules/optimisation/uoe-dial3/psykal/global.py +++ /dev/null @@ -1,32 +0,0 @@ -############################################################################## -# Copyright (c) 2025, Met Office, on behalf of HMSO and Queen's Printer -# For further details please refer to the file LICENCE.original which you -# should have received as part of this distribution. -############################################################################## - - -''' -PSyclone transformation script for the LFRic (Dynamo0p3) API to apply -colouring, OpenMP and redundant computation to the level-1 halo for -the initialisation built-ins generically. - -''' - -from psyclone_tools import (redundant_computation_setval, colour_loops, - openmp_parallelise_loops, - view_transformed_schedule) - - -def trans(psyir): - ''' - Applies PSyclone colouring, OpenMP and redundant computation - transformations. - - :param psyir: the PSyIR of the PSy-layer. - :type psyir: :py:class:`psyclone.psyir.nodes.FileContainer` - - ''' - redundant_computation_setval(psyir) - colour_loops(psyir) - openmp_parallelise_loops(psyir) - view_transformed_schedule(psyir) diff --git a/applications/jules/optimisation/uoe-epic b/applications/jules/optimisation/uoe-epic new file mode 120000 index 000000000..e5b7210c6 --- /dev/null +++ b/applications/jules/optimisation/uoe-epic @@ -0,0 +1 @@ +meto-ex1a \ No newline at end of file diff --git a/applications/jules/optimisation/uoe-epic/psykal/global.py b/applications/jules/optimisation/uoe-epic/psykal/global.py deleted file mode 100644 index 952b2d506..000000000 --- a/applications/jules/optimisation/uoe-epic/psykal/global.py +++ /dev/null @@ -1,32 +0,0 @@ -############################################################################## -# Copyright (c) 2025, Met Office, on behalf of HMSO and Queen's Printer -# For further details please refer to the file LICENCE.original which you -# should have received as part of this distribution. -############################################################################## - - -''' -PSyclone transformation script for the LFRic (Dynamo0p3) API to apply -colouring, OpenMP and redundant computation to the level-1 halo for -the initialisation built-ins generically. - -''' - -from psyclone_tools import (redundant_computation_setval, colour_loops, - openmp_parallelise_loops, - view_transformed_schedule) - - -def trans(psyir): - ''' - Applies PSyclone colouring, OpenMP and redundant computation - transformations. - - :param psyir: the PSyIR of the PSy-layer. - :type psyir: :py:class:`psyclone.psyir.nodes.FileContainer` - - ''' - redundant_computation_setval(psyir) - colour_loops(psyir) - openmp_parallelise_loops(psyir) - view_transformed_schedule(psyir) diff --git a/applications/jules/rose-meta/lfric-jules/version30_31.py b/applications/jules/rose-meta/lfric-jules/version30_31.py new file mode 100644 index 000000000..4a05bb502 --- /dev/null +++ b/applications/jules/rose-meta/lfric-jules/version30_31.py @@ -0,0 +1,207 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/jules/rose-meta/lfric-jules/vn3.1/rose-meta.conf new file mode 100644 index 000000000..47acbb91f --- /dev/null +++ b/applications/jules/rose-meta/lfric-jules/vn3.1/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-gungho/vn3.1 diff --git a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/version30_31.py b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/version30_31.py new file mode 100644 index 000000000..b53f1e61c --- /dev/null +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/version30_31.py @@ -0,0 +1,229 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t48(MacroUpgrade): + """Upgrade macro for ticket #48 by Juan M Castillo.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t48" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric2lfric + self.add_setting(config, ["namelist:lfric2lfric", "mode"], "'ics'") + self.add_setting( + config, + ["namelist:lfric2lfric", "source_file_lbc"], + "'source_file_lbc'", + ) + self.add_setting( + config, + ["namelist:lfric2lfric", "weight_file_lbc"], + "'weight_file_lbc'", + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t48" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/vn3.1/rose-meta.conf new file mode 100644 index 000000000..30b4384d5 --- /dev/null +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/vn3.1/rose-meta.conf @@ -0,0 +1,292 @@ +import=lfric-gungho/vn3.1 + +[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. +ns=namelist/lfric2lfric/configuration +!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. + = +ns=namelist/lfric2lfric/configuration +!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=mode] +compulsory=true +description=Generate Initial Conditions (ics) or Lateral Boundary Conditions (lbc) +!enumeration=true +help=Indicates whether to generate data on the destination mesh from data + =on the source mesh (ics), or whether to generate lateral boundary + =conditions for a regional destination mesh from data on the source + =mesh (lbc). +ns=namelist/lfric2lfric/configuration +trigger=namelist:lfric2lfric=source_file_lbc: 'lbc' ; + =namelist:lfric2lfric=weight_file_lbc: 'lbc' ; +value-titles=Initial conditions,Boundary conditions +values='ics','lbc' + +[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. +ns=namelist/lfric2lfric/configuration +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. + = +ns=namelist/lfric2lfric/configuration +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. The weight file is specified in the + = OASIS namcouple file + = +ns=namelist/lfric2lfric/configuration +trigger=namelist:lfric2lfric=weight_file: 'lfric2lfric' ; + =namelist:lfric2lfric=weight_file_lbc: 'lfric2lfric' ; +value-titles=Inter-grid maps, LFRic2LFRic, Oasis +values='map','lfric2lfric','oasis' + +[namelist:lfric2lfric=source_file_lbc] +compulsory=true +description=Location of the lbc source file +help=File from where lateral boundary conditions will be generated + = +ns=namelist/lfric2lfric/configuration +!string_length=filename +type=character + +[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. +ns=namelist/lfric2lfric/configuration +!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. + = +ns=namelist/lfric2lfric/configuration +!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 + = +ns=namelist/lfric2lfric/configuration +sort-key=2 +value-titles=global, LAM, LBC +values='global', 'LAM', 'LBC' + +[namelist:lfric2lfric=weight_file] +compulsory=true +description=Weight file for ics mesh regridding +fail-if=this == '' ; +help=Location of the weight file used to interpolate + =between the source and destination meshes + =when creating checkpoint files +ns=namelist/lfric2lfric/configuration +!string_length=filename +type=character + +[namelist:lfric2lfric=weight_file_lbc] +compulsory=true +description=Weight file for lbc mesh regridding +fail-if=this == '' ; +help=Location of the weight file used to interpolate + =between the source and destination meshes + =when creating lateral boundary files +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/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 index ed33304a0..83f7f6c1f 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 @@ -172,7 +172,7 @@ contains character(len=str_def) :: source_file_lbc ! lfric2lfric namelist parameters - integer(kind=i_def) :: stencil_depth + integer(kind=i_def) :: stencil_depth(1) integer(kind=i_def) :: source_geometry integer(i_def) :: mode integer(i_def) :: regrid_method @@ -317,7 +317,7 @@ contains !----------------------------------------------------------------------- ! Create the required meshes !----------------------------------------------------------------------- - stencil_depth = get_required_stencil_depth() + stencil_depth = 2 call init_mesh( modeldb%configuration, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 index 87cb9109a..3b20a554e 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 @@ -75,7 +75,8 @@ module lfric2lfric_init_mesh_mod !> @param[in] total_ranks Total number of MPI ranks in this job. !> @param[in] mesh_names Mesh names to load from the mesh input file(s). !> @param[in] extrusion Extrusion object to be applied to meshes. -!> @param[in] stencil_depth Required stencil depth for the application. +!> @param[in] stencil_depths_in Required stencil depth for the application +!! for each mesh. !> @param[in] regrid_method Apply check for even partitions with the !> configured partition strategy if the !> regridding method is 'map'. @@ -85,7 +86,7 @@ subroutine init_mesh( configuration, & local_rank, total_ranks, & mesh_names, & extrusion, & - stencil_depth, & + stencil_depths_in, & regrid_method ) implicit none @@ -97,7 +98,7 @@ subroutine init_mesh( configuration, & integer(kind=i_def), intent(in) :: total_ranks character(len=*), intent(in) :: mesh_names(2) class(extrusion_type), intent(in) :: extrusion - integer(kind=i_def), intent(in) :: stencil_depth + integer(kind=i_def), intent(in) :: stencil_depths_in(:) integer(kind=i_def), intent(in) :: regrid_method ! Parameters @@ -123,7 +124,9 @@ subroutine init_mesh( configuration, & integer(kind=i_def) :: mesh_selection(2) ! Local variables + integer(kind=i_def) :: i character(len=str_max_filename) :: mesh_file(2) + integer(kind=i_def) :: stencil_depths(2) procedure(partitioner_interface), pointer :: partitioner_src => null() procedure(partitioner_interface), pointer :: partitioner_dst => null() @@ -173,6 +176,22 @@ subroutine init_mesh( configuration, & call log_event(log_scratch_space, log_level_error) end if + ! Set up stencil depths + if ( size(stencil_depths) == 1 ) then + ! Single stencil depth specified, apply to all meshes + do i = 1, size(mesh_names) + stencil_depths(i) = stencil_depths_in(1) + end do + else if ( size(stencil_depths) == size(mesh_names) ) then + ! Stencil depths specified per mesh + stencil_depths(:) = stencil_depths_in(:) + else + write(log_scratch_space, '(A)') & + 'Number of stencil depths specified does not '// & + 'match number of requested meshes.' + call log_event(log_scratch_space, log_level_error) + end if + !=========================================================================== ! Create local mesh objects: @@ -231,8 +250,8 @@ subroutine init_mesh( configuration, & ! meshes are suitable for the supplied application ! configuration. !=========================================================== - call check_local_mesh( configuration, & - stencil_depth, & + call check_local_mesh( configuration, & + stencil_depths, & mesh_names ) ! Load and assign mesh maps. @@ -303,14 +322,14 @@ subroutine init_mesh( configuration, & call create_local_mesh( mesh_names(dst:dst), & local_rank, total_ranks, & decomposition_dst, & - stencil_depth, & + stencil_depths, & generate_inner_halos(dst), & partitioner_dst ) call create_local_mesh( mesh_names(src:src), & local_rank, total_ranks, & decomposition_src, & - stencil_depth, & + stencil_depths, & generate_inner_halos(src), & partitioner_src ) diff --git a/applications/lfric_atm/Makefile b/applications/lfric_atm/Makefile index e45cb2d89..7457acec7 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)/../physics_scratch +build: export SCRATCH_DIR := $(WORKING_DIR)/.. build: export WORKING_DIR := $(WORKING_DIR) build: export LDFLAGS_GROUPS = OPENMP diff --git a/applications/lfric_atm/build/compile_options.mk b/applications/lfric_atm/build/compile_options.mk index 143f09ae6..842a61d60 100644 --- a/applications/lfric_atm/build/compile_options.mk +++ b/applications/lfric_atm/build/compile_options.mk @@ -13,7 +13,8 @@ $(info UM physics specific compile options) include $(PROJECT_DIR)/build/fortran/$(FORTRAN_COMPILER).mk -science/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +casim/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +ukca/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) jules/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) socrates/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) legacy/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) diff --git a/applications/lfric_atm/build/psyclone_transmute_file_list.mk b/applications/lfric_atm/build/psyclone_transmute_file_list.mk index ae3bdf711..589731269 100644 --- a/applications/lfric_atm/build/psyclone_transmute_file_list.mk +++ b/applications/lfric_atm/build/psyclone_transmute_file_list.mk @@ -32,6 +32,9 @@ export PSYCLONE_PHYSICS_FILES = \ kmkhz_9c_wtrac \ lw_kernel_mod \ mphys_kernel_mod \ + pc2_bl_forced_cu \ + pc2_bm_initiate \ + pc2_initiation_ctl \ pc2_initiation_kernel_mod \ pc2_conv_coupling_kernel_mod \ sw_kernel_mod \ diff --git a/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/global.py b/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/global.py index ed2122df9..3e96112c8 120000 --- a/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/global.py +++ b/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/global.py @@ -1 +1 @@ -meto-ex1a/transmute/global.py \ No newline at end of file +../../../../../applications/lfric_atm/optimisation/meto-ex1a/transmute/global.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/kernel b/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/kernel index 29555a6a3..2a7f97bb3 120000 --- a/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/kernel +++ b/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/kernel @@ -1 +1 @@ -meto-ex1a/transmute/kernel \ No newline at end of file +../../../../../applications/lfric_atm/optimisation/meto-ex1a/transmute/kernel/ \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/science b/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/science index cbcf01b31..45b5d1f38 120000 --- a/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/science +++ b/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/science @@ -1 +1 @@ -meto-ex1a/transmute/science \ No newline at end of file +../../../../../applications/lfric_atm/optimisation/meto-ex1a/transmute/science/ \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/script_options.py b/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/script_options.py index 3da88ff15..d700f71b8 120000 --- a/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/script_options.py +++ b/applications/lfric_atm/optimisation/cpu-azngarch-sandbox/transmute/script_options.py @@ -1 +1 @@ -meto-ex1a/transmute/script_options.py \ No newline at end of file +../../../../../applications/lfric_atm/optimisation/meto-ex1a/transmute/script_options.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bl_forced_cu.py b/applications/lfric_atm/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bl_forced_cu.py new file mode 100644 index 000000000..b34a512f6 --- /dev/null +++ b/applications/lfric_atm/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bl_forced_cu.py @@ -0,0 +1,47 @@ +############################################################################## +# (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. +############################################################################## +""" +Optimisation script that replaces existing OpenMP parallelisation with +PSyclone-generated directives to target loops over index i instead of +index j. Trip count of j loops is 1 in LFRic, which prevents parallel +execution. +""" + +import logging +from psyclone.transformations import TransformationError +from psyclone.psyir.nodes import Loop +from transmute_psytrans.transmute_functions import ( + get_outer_loops, + get_compiler, + first_priv_red_init, + OMP_PARALLEL_LOOP_DO_TRANS_DYNAMIC, + OMP_PARALLEL_LOOP_DO_TRANS_STATIC +) + + +def trans(psyir): + """ + Apply OpenMP Directives + """ + + # Identify outer loops + outer_loops = [loop for loop in get_outer_loops(psyir) + if not loop.ancestor(Loop)] + + # Apply OpenMP parallel do directives and use workaround for + # firstprivate variable issue; replicate dynamic and static + # schedules of the original implementation + try: + for idx, loop in enumerate(outer_loops): + if get_compiler() == 'cce': + first_priv_red_init(loop, ["cf_base", "cf_forced", "dcfl", + "dqcl", "qcl_forced", "qcl_tol"]) + if idx == 0: + OMP_PARALLEL_LOOP_DO_TRANS_DYNAMIC.apply(loop.walk(Loop)[1]) + else: + OMP_PARALLEL_LOOP_DO_TRANS_STATIC.apply(loop.walk(Loop)[1]) + except (TransformationError, IndexError) as err: + logging.warning("OMPParallelLoopTrans failed: %s", err) diff --git a/applications/lfric_atm/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bm_initiate.py b/applications/lfric_atm/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bm_initiate.py new file mode 100644 index 000000000..b1286eb05 --- /dev/null +++ b/applications/lfric_atm/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bm_initiate.py @@ -0,0 +1,145 @@ +############################################################################## +# (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. +############################################################################## +""" +Optimisation script that replaces existing OpenMP parallelisation with +PSyclone-generated directives to target loops over index i instead of +index j. Trip count of j loops is 1 in LFRic, which prevents parallel +execution. Private variables need to be declared explicitly as PSyclone +analysis currently misses a scalar variable that a subroutine modifies in +a parallel region. PSyclone thread safety checks need to be overridden; +the subroutines can be safely parallelised. Compiler directives used in +the original code are re-inserted for performance and consistency of output. +""" + +import logging +from psyclone.transformations import TransformationError +from psyclone.psyir.nodes import (Loop, CodeBlock) +from transmute_psytrans.transmute_functions import ( + set_pure_subroutines, + get_outer_loops, + mark_explicit_privates, + get_compiler, + first_priv_red_init, + match_lhs_assignments, + match_call_args, + OMP_PARALLEL_REGION_TRANS, + OMP_DO_LOOP_TRANS_STATIC +) + +# Variables in parallel region that need to be private +private_variables = [ + "alphal", "alx", "i", "j", "k", "km1", "kp1", "mux", "tmp", + "frac_init", "kk", "kkm1", "kkp1", "qc", "qc_points", "qsl", + "tlx", "qsi", "idx", "deltacl_c", "deltacf_c", "deltaql_c", + "cf_c", "cfl_c", "cff_c" +] + +# Subroutines that need to be declared as "pure" +pure_subroutines = ["qsat", "qsat_mix", "qsat_wat", "qsat_wat_mix"] + +# Variables that appear on the left-hand side of assignments +# or as call arguments for which PSyclone dependency errors +# can be ignored +false_dep_vars = [ + "qc_points", + "idx", + "tl_in", + "p_theta_levels", + "qsi_lay", + "qsl_lay", +] + + +class CompilerDirective(): + """ + Custom compiler directive class to avoid an issue + with fparser.two.Fortran2003.Directive that will + be resolved in an upcoming fparser release. + """ + def __init__(self, directive): + self.directive = directive + + def tofortran(self): + """ + Return directive with prefix + """ + return "!DIR$ " + self.directive + + +def trans(psyir): + """ + Apply OpenMP and Compiler Directives + """ + + # Declare subroutines as pure to enable parallelisation + # of the encompassing loops + set_pure_subroutines(psyir, pure_subroutines) + + # Identify outer loops for setting up parallel regions + outer_loops = [loop for loop in get_outer_loops(psyir) + if not loop.ancestor(Loop)] + + # Check if first OpenMP region can be parallelised and + # apply directives + try: + OMP_PARALLEL_REGION_TRANS.validate(outer_loops[0:2]) + OMP_PARALLEL_REGION_TRANS.apply(outer_loops[0:2]) + OMP_DO_LOOP_TRANS_STATIC.apply(outer_loops[0]) + OMP_DO_LOOP_TRANS_STATIC.apply(outer_loops[1].walk(Loop)[1]) + except (TransformationError, IndexError) as err: + logging.warning("Parallelisation of the 1st region failed: %s", err) + + # Declare private symbols for the last loop nest explicitly, + # PSyclone misses one + mark_explicit_privates(outer_loops[2], private_variables) + + # Parallelise the second region and insert compiler directives + # Add redundant variable initialisation to work around a known + # PSyclone issue when using CCE + try: + if get_compiler() == 'cce': + first_priv_red_init(outer_loops[2], ["i", "j", "k"]) + + OMP_PARALLEL_REGION_TRANS.validate(outer_loops[2:3]) + OMP_PARALLEL_REGION_TRANS.apply(outer_loops[2]) + + # Insert before OpenMP directives to avoid PSyclone errors + if get_compiler() == "cce": + for loop in outer_loops[2].walk(Loop)[3:5]: + cblock = CodeBlock([CompilerDirective("NOFISSION")], + CodeBlock.Structure.STATEMENT) + insert_at = loop.parent.children.index(loop) + loop.parent.children.insert(insert_at, cblock) + + for loop in outer_loops[2].walk(Loop)[13:16]: + cblock = CodeBlock([CompilerDirective("IVDEP")], + CodeBlock.Structure.STATEMENT) + insert_at = loop.parent.children.index(loop) + loop.parent.children.insert(insert_at, cblock) + + for loop in outer_loops[2].walk(Loop)[2:7]: + # Check if any eligible variables appear in subroutine + # call arguments; these lead to false dependency errors + # in the parallel loop transformation that can be + # ignored + ignore_deps_vars = match_call_args(loop, false_dep_vars) + options = {} + if len(ignore_deps_vars) > 0: + options["ignore_dependencies_for"] = ignore_deps_vars + OMP_DO_LOOP_TRANS_STATIC.apply(loop, options) + + for loop in outer_loops[2].walk(Loop)[8:13:2]: + # Check if any eligible variables appear on the LHS of + # assignment expressions to ignore false dependency errors + ignore_deps_vars = match_lhs_assignments(loop, false_dep_vars) + options = {} + if len(ignore_deps_vars) > 0: + options["ignore_dependencies_for"] = ignore_deps_vars + + OMP_DO_LOOP_TRANS_STATIC.apply(loop, options) + + except (TransformationError, IndexError) as err: + logging.warning("Parallelisation of the 2nd region failed: %s", err) diff --git a/applications/lfric_atm/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_initiation_ctl.py b/applications/lfric_atm/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_initiation_ctl.py new file mode 100644 index 000000000..f0d19a243 --- /dev/null +++ b/applications/lfric_atm/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_initiation_ctl.py @@ -0,0 +1,37 @@ +############################################################################## +# (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. +############################################################################## +""" +Optimisation script that replaces existing OpenMP parallelisation with +PSyclone-generated directives to parallelise additional loops. +""" + +import logging +from psyclone.transformations import TransformationError +from psyclone.psyir.nodes import Loop +from transmute_psytrans.transmute_functions import ( + get_outer_loops, + OMP_PARALLEL_LOOP_DO_TRANS_STATIC, +) + + +def trans(psyir): + """ + Apply OpenMP Directives + """ + + # Identify outer loops in the subroutine + outer_loops = [loop for loop in get_outer_loops(psyir) + if not loop.ancestor(Loop)] + + try: + # Parallelise k-loops and i-loops (j-loops have a trip count of 1) + for loop in outer_loops: + if loop.variable.name == 'k': + OMP_PARALLEL_LOOP_DO_TRANS_STATIC.apply(loop) + elif loop.variable.name == 'j': + OMP_PARALLEL_LOOP_DO_TRANS_STATIC.apply(loop.walk(Loop)[1]) + except (TransformationError, IndexError) as err: + logging.warning("OMPParallelLoopTrans failed: %s", err) diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/large_scale_cloud/pc2_bl_forced_cu.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/large_scale_cloud/pc2_bl_forced_cu.py new file mode 100644 index 000000000..b34a512f6 --- /dev/null +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/large_scale_cloud/pc2_bl_forced_cu.py @@ -0,0 +1,47 @@ +############################################################################## +# (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. +############################################################################## +""" +Optimisation script that replaces existing OpenMP parallelisation with +PSyclone-generated directives to target loops over index i instead of +index j. Trip count of j loops is 1 in LFRic, which prevents parallel +execution. +""" + +import logging +from psyclone.transformations import TransformationError +from psyclone.psyir.nodes import Loop +from transmute_psytrans.transmute_functions import ( + get_outer_loops, + get_compiler, + first_priv_red_init, + OMP_PARALLEL_LOOP_DO_TRANS_DYNAMIC, + OMP_PARALLEL_LOOP_DO_TRANS_STATIC +) + + +def trans(psyir): + """ + Apply OpenMP Directives + """ + + # Identify outer loops + outer_loops = [loop for loop in get_outer_loops(psyir) + if not loop.ancestor(Loop)] + + # Apply OpenMP parallel do directives and use workaround for + # firstprivate variable issue; replicate dynamic and static + # schedules of the original implementation + try: + for idx, loop in enumerate(outer_loops): + if get_compiler() == 'cce': + first_priv_red_init(loop, ["cf_base", "cf_forced", "dcfl", + "dqcl", "qcl_forced", "qcl_tol"]) + if idx == 0: + OMP_PARALLEL_LOOP_DO_TRANS_DYNAMIC.apply(loop.walk(Loop)[1]) + else: + OMP_PARALLEL_LOOP_DO_TRANS_STATIC.apply(loop.walk(Loop)[1]) + except (TransformationError, IndexError) as err: + logging.warning("OMPParallelLoopTrans failed: %s", err) diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/large_scale_cloud/pc2_bm_initiate.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/large_scale_cloud/pc2_bm_initiate.py new file mode 100644 index 000000000..b1286eb05 --- /dev/null +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/large_scale_cloud/pc2_bm_initiate.py @@ -0,0 +1,145 @@ +############################################################################## +# (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. +############################################################################## +""" +Optimisation script that replaces existing OpenMP parallelisation with +PSyclone-generated directives to target loops over index i instead of +index j. Trip count of j loops is 1 in LFRic, which prevents parallel +execution. Private variables need to be declared explicitly as PSyclone +analysis currently misses a scalar variable that a subroutine modifies in +a parallel region. PSyclone thread safety checks need to be overridden; +the subroutines can be safely parallelised. Compiler directives used in +the original code are re-inserted for performance and consistency of output. +""" + +import logging +from psyclone.transformations import TransformationError +from psyclone.psyir.nodes import (Loop, CodeBlock) +from transmute_psytrans.transmute_functions import ( + set_pure_subroutines, + get_outer_loops, + mark_explicit_privates, + get_compiler, + first_priv_red_init, + match_lhs_assignments, + match_call_args, + OMP_PARALLEL_REGION_TRANS, + OMP_DO_LOOP_TRANS_STATIC +) + +# Variables in parallel region that need to be private +private_variables = [ + "alphal", "alx", "i", "j", "k", "km1", "kp1", "mux", "tmp", + "frac_init", "kk", "kkm1", "kkp1", "qc", "qc_points", "qsl", + "tlx", "qsi", "idx", "deltacl_c", "deltacf_c", "deltaql_c", + "cf_c", "cfl_c", "cff_c" +] + +# Subroutines that need to be declared as "pure" +pure_subroutines = ["qsat", "qsat_mix", "qsat_wat", "qsat_wat_mix"] + +# Variables that appear on the left-hand side of assignments +# or as call arguments for which PSyclone dependency errors +# can be ignored +false_dep_vars = [ + "qc_points", + "idx", + "tl_in", + "p_theta_levels", + "qsi_lay", + "qsl_lay", +] + + +class CompilerDirective(): + """ + Custom compiler directive class to avoid an issue + with fparser.two.Fortran2003.Directive that will + be resolved in an upcoming fparser release. + """ + def __init__(self, directive): + self.directive = directive + + def tofortran(self): + """ + Return directive with prefix + """ + return "!DIR$ " + self.directive + + +def trans(psyir): + """ + Apply OpenMP and Compiler Directives + """ + + # Declare subroutines as pure to enable parallelisation + # of the encompassing loops + set_pure_subroutines(psyir, pure_subroutines) + + # Identify outer loops for setting up parallel regions + outer_loops = [loop for loop in get_outer_loops(psyir) + if not loop.ancestor(Loop)] + + # Check if first OpenMP region can be parallelised and + # apply directives + try: + OMP_PARALLEL_REGION_TRANS.validate(outer_loops[0:2]) + OMP_PARALLEL_REGION_TRANS.apply(outer_loops[0:2]) + OMP_DO_LOOP_TRANS_STATIC.apply(outer_loops[0]) + OMP_DO_LOOP_TRANS_STATIC.apply(outer_loops[1].walk(Loop)[1]) + except (TransformationError, IndexError) as err: + logging.warning("Parallelisation of the 1st region failed: %s", err) + + # Declare private symbols for the last loop nest explicitly, + # PSyclone misses one + mark_explicit_privates(outer_loops[2], private_variables) + + # Parallelise the second region and insert compiler directives + # Add redundant variable initialisation to work around a known + # PSyclone issue when using CCE + try: + if get_compiler() == 'cce': + first_priv_red_init(outer_loops[2], ["i", "j", "k"]) + + OMP_PARALLEL_REGION_TRANS.validate(outer_loops[2:3]) + OMP_PARALLEL_REGION_TRANS.apply(outer_loops[2]) + + # Insert before OpenMP directives to avoid PSyclone errors + if get_compiler() == "cce": + for loop in outer_loops[2].walk(Loop)[3:5]: + cblock = CodeBlock([CompilerDirective("NOFISSION")], + CodeBlock.Structure.STATEMENT) + insert_at = loop.parent.children.index(loop) + loop.parent.children.insert(insert_at, cblock) + + for loop in outer_loops[2].walk(Loop)[13:16]: + cblock = CodeBlock([CompilerDirective("IVDEP")], + CodeBlock.Structure.STATEMENT) + insert_at = loop.parent.children.index(loop) + loop.parent.children.insert(insert_at, cblock) + + for loop in outer_loops[2].walk(Loop)[2:7]: + # Check if any eligible variables appear in subroutine + # call arguments; these lead to false dependency errors + # in the parallel loop transformation that can be + # ignored + ignore_deps_vars = match_call_args(loop, false_dep_vars) + options = {} + if len(ignore_deps_vars) > 0: + options["ignore_dependencies_for"] = ignore_deps_vars + OMP_DO_LOOP_TRANS_STATIC.apply(loop, options) + + for loop in outer_loops[2].walk(Loop)[8:13:2]: + # Check if any eligible variables appear on the LHS of + # assignment expressions to ignore false dependency errors + ignore_deps_vars = match_lhs_assignments(loop, false_dep_vars) + options = {} + if len(ignore_deps_vars) > 0: + options["ignore_dependencies_for"] = ignore_deps_vars + + OMP_DO_LOOP_TRANS_STATIC.apply(loop, options) + + except (TransformationError, IndexError) as err: + logging.warning("Parallelisation of the 2nd region failed: %s", err) diff --git a/applications/lfric_atm/optimisation/meto-ex1a/transmute/large_scale_cloud/pc2_initiation_ctl.py b/applications/lfric_atm/optimisation/meto-ex1a/transmute/large_scale_cloud/pc2_initiation_ctl.py new file mode 100644 index 000000000..f0d19a243 --- /dev/null +++ b/applications/lfric_atm/optimisation/meto-ex1a/transmute/large_scale_cloud/pc2_initiation_ctl.py @@ -0,0 +1,37 @@ +############################################################################## +# (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. +############################################################################## +""" +Optimisation script that replaces existing OpenMP parallelisation with +PSyclone-generated directives to parallelise additional loops. +""" + +import logging +from psyclone.transformations import TransformationError +from psyclone.psyir.nodes import Loop +from transmute_psytrans.transmute_functions import ( + get_outer_loops, + OMP_PARALLEL_LOOP_DO_TRANS_STATIC, +) + + +def trans(psyir): + """ + Apply OpenMP Directives + """ + + # Identify outer loops in the subroutine + outer_loops = [loop for loop in get_outer_loops(psyir) + if not loop.ancestor(Loop)] + + try: + # Parallelise k-loops and i-loops (j-loops have a trip count of 1) + for loop in outer_loops: + if loop.variable.name == 'k': + OMP_PARALLEL_LOOP_DO_TRANS_STATIC.apply(loop) + elif loop.variable.name == 'j': + OMP_PARALLEL_LOOP_DO_TRANS_STATIC.apply(loop.walk(Loop)[1]) + except (TransformationError, IndexError) as err: + logging.warning("OMPParallelLoopTrans failed: %s", err) diff --git a/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/aerosol_ukca_alg_mod.py b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/aerosol_ukca_alg_mod.py index 04f6e8991..679150724 120000 --- a/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/aerosol_ukca_alg_mod.py +++ b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/aerosol_ukca_alg_mod.py @@ -1 +1 @@ -./../../../meto-ex1a/psykal/algorithm/aerosol_ukca_alg_mod.py \ No newline at end of file +../../../meto-ex1a/psykal/algorithm/aerosol_ukca_alg_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/bl_imp_alg_mod.py b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/bl_imp_alg_mod.py index 002bb3751..e614250df 120000 --- a/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/bl_imp_alg_mod.py +++ b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/bl_imp_alg_mod.py @@ -1 +1 @@ -./../../../meto-ex1a/psykal/algorithm/bl_imp_alg_mod.py \ No newline at end of file +../../../meto-ex1a/psykal/algorithm/bl_imp_alg_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/casim_alg_mod.py b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/casim_alg_mod.py index 04a064519..0aa4d7a59 120000 --- a/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/casim_alg_mod.py +++ b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/casim_alg_mod.py @@ -1 +1 @@ -./../../../meto-ex1a/psykal/algorithm/casim_alg_mod.py \ No newline at end of file +../../../meto-ex1a/psykal/algorithm/casim_alg_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/checksum_alg_mod.py b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/checksum_alg_mod.py index 451c9586a..c9f9f6502 120000 --- a/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/checksum_alg_mod.py +++ b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/checksum_alg_mod.py @@ -1 +1 @@ -./../../../meto-ex1a/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/lfric_atm/optimisation/nci-gadi/psykal/algorithm/conv_comorph_alg_mod.py b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/conv_comorph_alg_mod.py new file mode 120000 index 000000000..b28c1682d --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/conv_comorph_alg_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/psykal/algorithm/conv_comorph_alg_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/conv_gr_alg_mod.py b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/conv_gr_alg_mod.py new file mode 120000 index 000000000..eabfbaa3b --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/conv_gr_alg_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/psykal/algorithm/conv_gr_alg_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/transport/ffsl/ffsl_advective_updates_alg_mod.py b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/transport/ffsl/ffsl_advective_updates_alg_mod.py new file mode 120000 index 000000000..40c17efa5 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/psykal/algorithm/transport/ffsl/ffsl_advective_updates_alg_mod.py @@ -0,0 +1 @@ +../../../../../meto-ex1a/psykal/algorithm/transport/ffsl/ffsl_advective_updates_alg_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/psykal/global.py b/applications/lfric_atm/optimisation/nci-gadi/psykal/global.py index 7246d03a8..982b2e0cb 120000 --- a/applications/lfric_atm/optimisation/nci-gadi/psykal/global.py +++ b/applications/lfric_atm/optimisation/nci-gadi/psykal/global.py @@ -1 +1 @@ -./../../meto-ex1a/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/optimisation/nci-gadi/transmute/boundary_layer/bl_diags_mod.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/bl_diags_mod.py new file mode 120000 index 000000000..2c217bd54 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/bl_diags_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/boundary_layer/bl_diags_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/kmkhz_9c_wtrac.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/kmkhz_9c_wtrac.py new file mode 120000 index 000000000..12a465a66 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/kmkhz_9c_wtrac.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/boundary_layer/kmkhz_9c_wtrac.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/local.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/local.py new file mode 120000 index 000000000..5edcbfa60 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/local.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/boundary_layer/local.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/script_options.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/script_options.py new file mode 120000 index 000000000..829ef3af5 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/boundary_layer/script_options.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/boundary_layer/script_options.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/global.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/global.py deleted file mode 100644 index 3689181e3..000000000 --- a/applications/lfric_atm/optimisation/nci-gadi/transmute/global.py +++ /dev/null @@ -1,9 +0,0 @@ -############################################################################## -# Copyright (c) 2025, Met Office, on behalf of HMSO and Queen's Printer -# For further details please refer to the file LICENCE.original which you -# should have received as part of this distribution. -############################################################################## -''' -Placeholder script to ensure site is unaffected by changes. -Owners of site target should update this as required. -''' \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/global.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/global.py new file mode 120000 index 000000000..9d9260b1e --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/global.py @@ -0,0 +1 @@ +../../meto-ex1a/transmute/global.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/gravity_wave_drag/gw_ussp_mod.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/gravity_wave_drag/gw_ussp_mod.py new file mode 120000 index 000000000..e666aac63 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/gravity_wave_drag/gw_ussp_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/gravity_wave_drag/gw_ussp_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/bm_tau_kernel_mod.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/bm_tau_kernel_mod.py new file mode 120000 index 000000000..d739b20cf --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/bm_tau_kernel_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/kernel/bm_tau_kernel_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/conv_gr_kernel_mod.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/conv_gr_kernel_mod.py new file mode 120000 index 000000000..9eb6a2bd5 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/conv_gr_kernel_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/kernel/conv_gr_kernel_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/jules_exp_kernel_mod.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/jules_exp_kernel_mod.py new file mode 120000 index 000000000..6da54cffe --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/jules_exp_kernel_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/kernel/jules_exp_kernel_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/jules_extra_kernel_mod.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/jules_extra_kernel_mod.py new file mode 120000 index 000000000..a55a809de --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/jules_extra_kernel_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/kernel/jules_extra_kernel_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/jules_imp_kernel_mod.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/jules_imp_kernel_mod.py new file mode 120000 index 000000000..60f768d97 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/jules_imp_kernel_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/kernel/jules_imp_kernel_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/lw_kernel_mod.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/lw_kernel_mod.py new file mode 120000 index 000000000..a988c91b2 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/lw_kernel_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/kernel/lw_kernel_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/pc2_conv_coupling_kernel_mod.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/pc2_conv_coupling_kernel_mod.py new file mode 120000 index 000000000..859f80221 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/pc2_conv_coupling_kernel_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/kernel/pc2_conv_coupling_kernel_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/pc2_initiation_kernel_mod.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/pc2_initiation_kernel_mod.py new file mode 120000 index 000000000..83ba30d43 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/pc2_initiation_kernel_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/kernel/pc2_initiation_kernel_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/sw_kernel_mod.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/sw_kernel_mod.py new file mode 120000 index 000000000..d35f19b05 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/sw_kernel_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/kernel/sw_kernel_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/sw_rad_tile_kernel_mod.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/sw_rad_tile_kernel_mod.py new file mode 120000 index 000000000..6ad26ebf4 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/kernel/sw_rad_tile_kernel_mod.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/kernel/sw_rad_tile_kernel_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/large_scale_cloud/pc2_bl_forced_cu.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/large_scale_cloud/pc2_bl_forced_cu.py new file mode 120000 index 000000000..31274a37a --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/large_scale_cloud/pc2_bl_forced_cu.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/large_scale_cloud/pc2_bl_forced_cu.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/large_scale_cloud/pc2_bm_initiate.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/large_scale_cloud/pc2_bm_initiate.py new file mode 120000 index 000000000..f1985f0fb --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/large_scale_cloud/pc2_bm_initiate.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/large_scale_cloud/pc2_bm_initiate.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/large_scale_cloud/pc2_initiation_ctl.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/large_scale_cloud/pc2_initiation_ctl.py new file mode 120000 index 000000000..ad930479e --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/large_scale_cloud/pc2_initiation_ctl.py @@ -0,0 +1 @@ +../../../meto-ex1a/transmute/large_scale_cloud/pc2_initiation_ctl.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/science/ukca/src/control/core/top_level/ukca_main1-ukca_main1.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/science/ukca/src/control/core/top_level/ukca_main1-ukca_main1.py new file mode 120000 index 000000000..1e508fee4 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/science/ukca/src/control/core/top_level/ukca_main1-ukca_main1.py @@ -0,0 +1 @@ +../../../../../../../../meto-ex1a/transmute/science/ukca/src/control/core/top_level/ukca_main1-ukca_main1.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/science/ukca/src/science/core/aerosols/glomap/ukca_aero_ctl.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/science/ukca/src/science/core/aerosols/glomap/ukca_aero_ctl.py new file mode 120000 index 000000000..842cc90b6 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/science/ukca/src/science/core/aerosols/glomap/ukca_aero_ctl.py @@ -0,0 +1 @@ +../../../../../../../../../meto-ex1a/transmute/science/ukca/src/science/core/aerosols/glomap/ukca_aero_ctl.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/science/ukca/src/science/core/chemistry/ukca_chemistry_ctl_full_mod.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/science/ukca/src/science/core/chemistry/ukca_chemistry_ctl_full_mod.py new file mode 120000 index 000000000..b80baaed8 --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/science/ukca/src/science/core/chemistry/ukca_chemistry_ctl_full_mod.py @@ -0,0 +1 @@ +../../../../../../../../meto-ex1a/transmute/science/ukca/src/science/core/chemistry/ukca_chemistry_ctl_full_mod.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/nci-gadi/transmute/script_options.py b/applications/lfric_atm/optimisation/nci-gadi/transmute/script_options.py new file mode 120000 index 000000000..d887dbe9e --- /dev/null +++ b/applications/lfric_atm/optimisation/nci-gadi/transmute/script_options.py @@ -0,0 +1 @@ +../../meto-ex1a/transmute/script_options.py \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/uoe-dial3 b/applications/lfric_atm/optimisation/uoe-dial3 new file mode 120000 index 000000000..e5b7210c6 --- /dev/null +++ b/applications/lfric_atm/optimisation/uoe-dial3 @@ -0,0 +1 @@ +meto-ex1a \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/uoe-dial3/psykal/global.py b/applications/lfric_atm/optimisation/uoe-dial3/psykal/global.py deleted file mode 100644 index 758965e4e..000000000 --- a/applications/lfric_atm/optimisation/uoe-dial3/psykal/global.py +++ /dev/null @@ -1,32 +0,0 @@ -############################################################################## -# Copyright (c) 2017, Met Office, on behalf of HMSO and Queen's Printer -# For further details please refer to the file LICENCE.original which you -# should have received as part of this distribution. -############################################################################## - - -''' -PSyclone transformation script for the LFRic (Dynamo0p3) API to apply -colouring, OpenMP and redundant computation to the level-1 halo for -the initialisation built-ins generically. - -''' - -from psyclone_tools import (redundant_computation_setval, colour_loops, - openmp_parallelise_loops, - view_transformed_schedule) - - -def trans(psyir): - ''' - Applies PSyclone colouring, OpenMP and redundant computation - transformations. - - :param psyir: the PSyIR of the PSy-layer. - :type psyir: :py:class:`psyclone.psyir.nodes.FileContainer` - - ''' - redundant_computation_setval(psyir) - colour_loops(psyir) - openmp_parallelise_loops(psyir) - view_transformed_schedule(psyir) diff --git a/applications/lfric_atm/optimisation/uoe-dial3/transmute/global.py b/applications/lfric_atm/optimisation/uoe-dial3/transmute/global.py deleted file mode 100644 index 3689181e3..000000000 --- a/applications/lfric_atm/optimisation/uoe-dial3/transmute/global.py +++ /dev/null @@ -1,9 +0,0 @@ -############################################################################## -# Copyright (c) 2025, Met Office, on behalf of HMSO and Queen's Printer -# For further details please refer to the file LICENCE.original which you -# should have received as part of this distribution. -############################################################################## -''' -Placeholder script to ensure site is unaffected by changes. -Owners of site target should update this as required. -''' \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/uoe-epic b/applications/lfric_atm/optimisation/uoe-epic new file mode 120000 index 000000000..e5b7210c6 --- /dev/null +++ b/applications/lfric_atm/optimisation/uoe-epic @@ -0,0 +1 @@ +meto-ex1a \ No newline at end of file diff --git a/applications/lfric_atm/optimisation/uoe-epic/psykal/global.py b/applications/lfric_atm/optimisation/uoe-epic/psykal/global.py deleted file mode 100644 index 758965e4e..000000000 --- a/applications/lfric_atm/optimisation/uoe-epic/psykal/global.py +++ /dev/null @@ -1,32 +0,0 @@ -############################################################################## -# Copyright (c) 2017, Met Office, on behalf of HMSO and Queen's Printer -# For further details please refer to the file LICENCE.original which you -# should have received as part of this distribution. -############################################################################## - - -''' -PSyclone transformation script for the LFRic (Dynamo0p3) API to apply -colouring, OpenMP and redundant computation to the level-1 halo for -the initialisation built-ins generically. - -''' - -from psyclone_tools import (redundant_computation_setval, colour_loops, - openmp_parallelise_loops, - view_transformed_schedule) - - -def trans(psyir): - ''' - Applies PSyclone colouring, OpenMP and redundant computation - transformations. - - :param psyir: the PSyIR of the PSy-layer. - :type psyir: :py:class:`psyclone.psyir.nodes.FileContainer` - - ''' - redundant_computation_setval(psyir) - colour_loops(psyir) - openmp_parallelise_loops(psyir) - view_transformed_schedule(psyir) diff --git a/applications/lfric_atm/optimisation/uoe-epic/transmute/global.py b/applications/lfric_atm/optimisation/uoe-epic/transmute/global.py deleted file mode 100644 index 3689181e3..000000000 --- a/applications/lfric_atm/optimisation/uoe-epic/transmute/global.py +++ /dev/null @@ -1,9 +0,0 @@ -############################################################################## -# Copyright (c) 2025, Met Office, on behalf of HMSO and Queen's Printer -# For further details please refer to the file LICENCE.original which you -# should have received as part of this distribution. -############################################################################## -''' -Placeholder script to ensure site is unaffected by changes. -Owners of site target should update this as required. -''' \ No newline at end of file diff --git a/applications/lfric_atm/rose-meta/lfric-lfric_atm/version30_31.py b/applications/lfric_atm/rose-meta/lfric-lfric_atm/version30_31.py new file mode 100644 index 000000000..7c13cb416 --- /dev/null +++ b/applications/lfric_atm/rose-meta/lfric-lfric_atm/version30_31.py @@ -0,0 +1,207 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/lfric_atm/rose-meta/lfric-lfric_atm/vn3.1/rose-meta.conf new file mode 100644 index 000000000..47acbb91f --- /dev/null +++ b/applications/lfric_atm/rose-meta/lfric-lfric_atm/vn3.1/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-gungho/vn3.1 diff --git a/applications/lfric_coupled/Makefile b/applications/lfric_coupled/Makefile index 10b57aa7a..3954e7075 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)/../physics_scratch +build: export SCRATCH_DIR := $(WORKING_DIR)/.. build: export PROJECT = $(PROJECT_NAME) build: export WORKING_DIR := $(WORKING_DIR)/$(PROJECT_NAME) diff --git a/applications/lfric_coupled/build/compile_options.mk b/applications/lfric_coupled/build/compile_options.mk index 10ad895f2..9623d56e1 100644 --- a/applications/lfric_coupled/build/compile_options.mk +++ b/applications/lfric_coupled/build/compile_options.mk @@ -9,7 +9,8 @@ $(info UM physics specific compile options for $(FORTRAN_COMPILER) compiler) include $(PROJECT_DIR)/build/fortran/$(FORTRAN_COMPILER).mk -science/%.o science/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) +casim/%.o science/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) +ukca/%.o science/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) jules/%.o jules/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) socrates/%.o socrates/%.mod: private FFLAGS_EXTRA += $(FFLAGS_UM_PHYSICS) legacy/%.o legacy/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) diff --git a/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/version30_31.py b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/version30_31.py new file mode 100644 index 000000000..d43e7f54c --- /dev/null +++ b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/version30_31.py @@ -0,0 +1,207 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/vn3.1/rose-meta.conf new file mode 100644 index 000000000..47acbb91f --- /dev/null +++ b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/vn3.1/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-gungho/vn3.1 diff --git a/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 b/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 index a0630d7bf..cd39b0b27 100644 --- a/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 +++ b/applications/lfricinputs/source/common/lfricinp_lfric_driver_mod.f90 @@ -132,7 +132,7 @@ subroutine lfricinp_initialise_lfric(program_name_arg, & character(str_def) :: prime_mesh_name -integer(i_def) :: stencil_depth +integer(i_def) :: stencil_depth(1) integer(i_def) :: geometry real(r_def) :: domain_bottom real(r_def) :: scaled_radius diff --git a/applications/linear_model/plot_convergence/plot_convergence.py b/applications/linear_model/plot_convergence/plot_convergence.py deleted file mode 100644 index 811421c89..000000000 --- a/applications/linear_model/plot_convergence/plot_convergence.py +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -############################################################################## -# (c) Crown copyright 2021 Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -############################################################################## -''' -Using the output derived from the test_timesteps integration test with -10 values of gamma, plot a graph of the relative error (linearisation error) -against the size of the perturbation for different prognostic variables -(gamma). -''' -import os -import pandas as pd -import matplotlib.pyplot as plt - - -def plot_data(filename, axes, variable, color, shape): - ''' - Create a data frame with columns gamma (size of the perturbation) - and norm (the relative error). Plot this data with a log-log axis. - ''' - - datafile = open(filename, 'r') - - norm_line = [] - line = datafile.readline - - while line: - line = datafile.readline() - - if variable in line: - split_line = line.replace('norm', '').replace('\n', '').split('=') - norm_line.append([float(split_line[1]), float(split_line[2])]) - - norm_df = pd.DataFrame(norm_line, columns=['gamma', 'norm']) - - datafile.close() - - norm_df.plot.scatter(x='gamma', y='norm', loglog=True, xlim=(10**0, 10**5), - ylim=(10**-5, 10**0), ax=axes, color=color, - marker=shape) - - -def make_plot(directory, filename): - ''' - Plot the data for the different prognostic variables, together with the - expected gradient ( which is linear ), on the same plot. - ''' - - axs = plt.axes() - - plot_data(directory + filename, axs, 'gamma_rho', 'c', '<') - plot_data(directory + filename, axs, 'gamma_u', 'r', 'o') - plot_data(directory + filename, axs, 'gamma_exner', 'b', 's') - plot_data(directory + filename, axs, 'gamma_theta', 'g', '^') - plot_data(directory + filename, axs, 'gamma_total', 'black', 'x') - plot_data(directory + filename, axs, 'gamma_mr', 'm', '*') - - expected_x = [10**0, 10**5] - expected_y = [10**-5, 10**0] - plt.plot(expected_x, expected_y) - - plt.legend(['Expected gradient (linear)', 'density', 'momentum', - 'exner pressure', 'potential temperature', 'total', - 'moisture mixing ratios'], - loc='lower right') - plt.xlabel('Gamma') - plt.ylabel('Relative error') - plt.title('Validity of the tangent linear model') - - plt.show() - - -if __name__ == "__main__": - - DATA_DIRECTORY = os.getcwd()+'/' - DATA_FILENAME = 'outfile' - - make_plot(DATA_DIRECTORY, DATA_FILENAME) diff --git a/applications/linear_model/plot_convergence/plot_convergence.sh b/applications/linear_model/plot_convergence/plot_convergence.sh deleted file mode 100755 index ab6e366a5..000000000 --- a/applications/linear_model/plot_convergence/plot_convergence.sh +++ /dev/null @@ -1,83 +0,0 @@ -############################################################################## -# (c) Crown copyright 2022 Met Office. All rights reserved. -# The file LICENCE, distributed with this code, contains details of the terms -# under which the code may be used. -############################################################################## - -#---------------------------------------------------------------------- -# Plots the convergence rate of the tangent linear model. -#---------------------------------------------------------------------- - -# INSTRUCTIONS TO RUN -# 1. Specify CONFIG -# 2. Run using . plot_convergence.sh, from the plot_convergence directory - -# SCIENCE DETAILS -# The relative linearisation error is -# E = || N(x+ gamma x') - N(x) - L(x) gamma x' || / || L(x) gamma x' || -# where N=nonlinear model, L=linear model, x=linearisation state -# x'=perturbation, gamma=scalar. -# From the Taylor series expansion, E(gamma) = O(gamma) i.e. of the order gamma -# So the relative error should be a linear function of gamma - -# SCRIPT STEPS -# 1. Produce the data: The integration test tl_test_timesteps is extended by -# running over 10 values of gamma, rather than 2 values of gamma. -# 2. Plot the data: The data is plotted for each prognostic variable. - -# EXTENSION -# The plot_configuration.nml can also be extended to other configurations e.g -# * increase the number of timesteps (timesteps_end) -# * increase the number of timesteps between updating the linearisation state -# (update_ls_frequency) - -#-------------------------------------------------------------------------- - -# CONFIG can be specified as either runge_kutta or semi_implicit -CONFIG=semi_implicit - -# Define directories using the current working directory -Working_dir=$PWD -Linear_dir="$(dirname "$PWD")" - -# Integration tests executable name -exe=$Linear_dir/test/$CONFIG - -# Build the integration tests, unless that has already been completed -if [ -f $exe ] ; then - echo "Do not need to build the executable as $exe exists" -else - echo "$exe does not exist, so now building the executable" - cd $Linear_dir - make integration-tests - - if [$? -ne 0 ]; then - echo "Error building the executable" - return - fi -fi - -# Setup the configuration - to test with 10 values of gamma -cd $Linear_dir/test/test_files/$CONFIG -cp ${CONFIG}_configuration.nml plot_configuration.nml -sed -i 's/number_gamma_values=2/number_gamma_values=10/g' plot_configuration.nml -if [ $? -ne 0 ]; then - echo "Error in creating plot_configuration.nml" - return -fi - -# Run the tl_test_timesteps integration test -echo "Running the integration test" -../../$CONFIG plot_configuration.nml test_timesteps > outfile -if [ $? -ne 0 ]; then - echo "Error in creating outfile data" - return -else - echo "Data created successfully" -fi - -# Plot the data, together with the expected gradient -echo "Plotting the data" -python $Working_dir/plot_convergence.py - - diff --git a/applications/linear_model/rose-meta/lfric-linear_model/version30_31.py b/applications/linear_model/rose-meta/lfric-linear_model/version30_31.py new file mode 100644 index 000000000..f999b676e --- /dev/null +++ b/applications/linear_model/rose-meta/lfric-linear_model/version30_31.py @@ -0,0 +1,282 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t182" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/linear_model/rose-meta/lfric-linear_model/vn3.1/rose-meta.conf new file mode 100644 index 000000000..a95b2cf2e --- /dev/null +++ b/applications/linear_model/rose-meta/lfric-linear_model/vn3.1/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-linear/vn3.1 diff --git a/applications/name_transport/optimisation/niwa-xc50/psykal/global.py b/applications/name_transport/optimisation/niwa-xc50/psykal/global.py index ee3d076f9..8437ff20e 120000 --- a/applications/name_transport/optimisation/niwa-xc50/psykal/global.py +++ b/applications/name_transport/optimisation/niwa-xc50/psykal/global.py @@ -1 +1 @@ -../../meto-ex1a/psykal/global.py +../../../../../applications/name_transport/optimisation/meto-ex1a/psykal/global.py \ No newline at end of file diff --git a/applications/name_transport/rose-meta/lfric-name_transport/version30_31.py b/applications/name_transport/rose-meta/lfric-name_transport/version30_31.py new file mode 100644 index 000000000..f3ae24ff5 --- /dev/null +++ b/applications/name_transport/rose-meta/lfric-name_transport/version30_31.py @@ -0,0 +1,207 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/name_transport/rose-meta/lfric-name_transport/vn3.1/rose-meta.conf new file mode 100644 index 000000000..6c7ece3c7 --- /dev/null +++ b/applications/name_transport/rose-meta/lfric-name_transport/vn3.1/rose-meta.conf @@ -0,0 +1,145 @@ +import=lfric-gungho/vn3.1 + +#============================================================================== +# 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/name_transport/source/driver/name_transport_driver_mod.f90 b/applications/name_transport/source/driver/name_transport_driver_mod.f90 index 60d5ae6ce..c0ef0ec06 100644 --- a/applications/name_transport/source/driver/name_transport_driver_mod.f90 +++ b/applications/name_transport/source/driver/name_transport_driver_mod.f90 @@ -109,12 +109,12 @@ subroutine initialise_name_transport( program_name, modeldb ) character(len=str_def), allocatable :: shifted_names(:) character(len=str_def), allocatable :: double_names(:) character(len=str_def) :: prime_mesh_name + integer(kind=i_def), allocatable :: stencil_depths(:) logical(kind=l_def) :: prepartitioned logical(kind=l_def) :: apply_partition_check integer(kind=i_def) :: geometry - integer(kind=i_def) :: stencil_depth real(kind=r_def) :: domain_bottom real(kind=r_def) :: domain_height real(kind=r_def) :: scaled_radius @@ -237,14 +237,18 @@ subroutine initialise_name_transport( program_name, modeldb ) ! 1.3a Initialise prime/2d meshes ! --------------------------------------------------------- - stencil_depth = get_required_stencil_depth() + allocate(stencil_depths(num_base_meshes)) + call get_required_stencil_depth( & + stencil_depths, base_mesh_names, modeldb%configuration & + ) + apply_partition_check = .false. call init_mesh( modeldb%configuration, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, & - extrusion, stencil_depth, & + extrusion, stencil_depths, & apply_partition_check ) call create_mesh( base_mesh_names, extrusion_2d, & @@ -351,11 +355,19 @@ subroutine initialise_name_transport( program_name, modeldb ) end if - if (allocated(base_mesh_names)) deallocate(base_mesh_names) - if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) - if (allocated(meshes_to_double)) deallocate(meshes_to_double) - + if (allocated(base_mesh_names)) deallocate(base_mesh_names) + if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) + if (allocated(meshes_to_double)) deallocate(meshes_to_double) + if (allocated(twod_names)) deallocate(twod_names) + if (allocated(shifted_names)) deallocate(shifted_names) + if (allocated(double_names)) deallocate(double_names) + if (allocated(extrusion)) deallocate(extrusion) + if (allocated(extrusion_2d)) deallocate(extrusion_2d) + if (allocated(extrusion_shifted)) deallocate(extrusion_shifted) + if (allocated(extrusion_double)) deallocate(extrusion_double) + if (allocated(stencil_depths)) deallocate(stencil_depths) if (allocated(extra_io_mesh_names)) deallocate(extra_io_mesh_names) + nullify(chi_inventory, panel_id_inventory, mesh) end subroutine initialise_name_transport diff --git a/applications/name_transport/source/kernel/set_name_field_kernel_mod.F90 b/applications/name_transport/source/kernel/set_name_field_kernel_mod.F90 index b0a58ca5c..453a1cc18 100644 --- a/applications/name_transport/source/kernel/set_name_field_kernel_mod.F90 +++ b/applications/name_transport/source/kernel/set_name_field_kernel_mod.F90 @@ -21,6 +21,10 @@ module set_name_field_kernel_mod use kernel_mod, only : kernel_type use log_mod, only : log_event, LOG_LEVEL_ERROR + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -143,7 +147,9 @@ subroutine set_name_field_code(nlayers, tracer, & chi_2_e(df1) = chi_2( map_chi(df1) + k ) chi_3_e(df1) = chi_3( map_chi(df1) + k ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi_1_e, chi_2_e, chi_3_e, & ipanel, chi_basis, chi_diff_basis, & jac, dj) diff --git a/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf b/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf index 7ae24e5d4..554823758 100644 --- a/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf +++ b/applications/name_transport/unit-test/kernel/set_name_field_kernel_mod_test.pf @@ -91,7 +91,7 @@ contains p_zero=100000.0_r_def, & scaling_factor=1.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/applications/ngarch/Makefile b/applications/ngarch/Makefile index 4c3ca1f69..a645cd3d2 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)/../physics_scratch +build: export SCRATCH_DIR := $(WORKING_DIR)/.. build: export PROJECT = $(PROJECT_NAME) build: export WORKING_DIR := $(WORKING_DIR) diff --git a/applications/ngarch/build/compile_options.mk b/applications/ngarch/build/compile_options.mk index 810698d65..4ef9b69bd 100644 --- a/applications/ngarch/build/compile_options.mk +++ b/applications/ngarch/build/compile_options.mk @@ -13,7 +13,8 @@ $(info UM physics specific compile options) include $(PROJECT_DIR)/build/fortran/$(FORTRAN_COMPILER).mk -science/%.o science/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +casim/%.o science/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) +ukca/%.o science/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) jules/%.o jules/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) socrates/%.o socrates/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) legacy/%.o legacy/%.mod: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) diff --git a/applications/ngarch/build/psyclone_transmute_file_list.mk b/applications/ngarch/build/psyclone_transmute_file_list.mk index da9997e42..855979f30 100644 --- a/applications/ngarch/build/psyclone_transmute_file_list.mk +++ b/applications/ngarch/build/psyclone_transmute_file_list.mk @@ -33,6 +33,9 @@ export PSYCLONE_PHYSICS_FILES = \ lw_kernel_mod \ mphys_kernel_mod \ pc2_initiation_kernel_mod \ + pc2_bl_forced_cu \ + pc2_bm_initiate \ + pc2_initiation_ctl \ pc2_conv_coupling_kernel_mod \ sw_kernel_mod \ sw_rad_tile_kernel_mod \ diff --git a/applications/ngarch/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bl_forced_cu.py b/applications/ngarch/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bl_forced_cu.py new file mode 100644 index 000000000..b34a512f6 --- /dev/null +++ b/applications/ngarch/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bl_forced_cu.py @@ -0,0 +1,47 @@ +############################################################################## +# (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. +############################################################################## +""" +Optimisation script that replaces existing OpenMP parallelisation with +PSyclone-generated directives to target loops over index i instead of +index j. Trip count of j loops is 1 in LFRic, which prevents parallel +execution. +""" + +import logging +from psyclone.transformations import TransformationError +from psyclone.psyir.nodes import Loop +from transmute_psytrans.transmute_functions import ( + get_outer_loops, + get_compiler, + first_priv_red_init, + OMP_PARALLEL_LOOP_DO_TRANS_DYNAMIC, + OMP_PARALLEL_LOOP_DO_TRANS_STATIC +) + + +def trans(psyir): + """ + Apply OpenMP Directives + """ + + # Identify outer loops + outer_loops = [loop for loop in get_outer_loops(psyir) + if not loop.ancestor(Loop)] + + # Apply OpenMP parallel do directives and use workaround for + # firstprivate variable issue; replicate dynamic and static + # schedules of the original implementation + try: + for idx, loop in enumerate(outer_loops): + if get_compiler() == 'cce': + first_priv_red_init(loop, ["cf_base", "cf_forced", "dcfl", + "dqcl", "qcl_forced", "qcl_tol"]) + if idx == 0: + OMP_PARALLEL_LOOP_DO_TRANS_DYNAMIC.apply(loop.walk(Loop)[1]) + else: + OMP_PARALLEL_LOOP_DO_TRANS_STATIC.apply(loop.walk(Loop)[1]) + except (TransformationError, IndexError) as err: + logging.warning("OMPParallelLoopTrans failed: %s", err) diff --git a/applications/ngarch/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bm_initiate.py b/applications/ngarch/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bm_initiate.py new file mode 100644 index 000000000..b1286eb05 --- /dev/null +++ b/applications/ngarch/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_bm_initiate.py @@ -0,0 +1,145 @@ +############################################################################## +# (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. +############################################################################## +""" +Optimisation script that replaces existing OpenMP parallelisation with +PSyclone-generated directives to target loops over index i instead of +index j. Trip count of j loops is 1 in LFRic, which prevents parallel +execution. Private variables need to be declared explicitly as PSyclone +analysis currently misses a scalar variable that a subroutine modifies in +a parallel region. PSyclone thread safety checks need to be overridden; +the subroutines can be safely parallelised. Compiler directives used in +the original code are re-inserted for performance and consistency of output. +""" + +import logging +from psyclone.transformations import TransformationError +from psyclone.psyir.nodes import (Loop, CodeBlock) +from transmute_psytrans.transmute_functions import ( + set_pure_subroutines, + get_outer_loops, + mark_explicit_privates, + get_compiler, + first_priv_red_init, + match_lhs_assignments, + match_call_args, + OMP_PARALLEL_REGION_TRANS, + OMP_DO_LOOP_TRANS_STATIC +) + +# Variables in parallel region that need to be private +private_variables = [ + "alphal", "alx", "i", "j", "k", "km1", "kp1", "mux", "tmp", + "frac_init", "kk", "kkm1", "kkp1", "qc", "qc_points", "qsl", + "tlx", "qsi", "idx", "deltacl_c", "deltacf_c", "deltaql_c", + "cf_c", "cfl_c", "cff_c" +] + +# Subroutines that need to be declared as "pure" +pure_subroutines = ["qsat", "qsat_mix", "qsat_wat", "qsat_wat_mix"] + +# Variables that appear on the left-hand side of assignments +# or as call arguments for which PSyclone dependency errors +# can be ignored +false_dep_vars = [ + "qc_points", + "idx", + "tl_in", + "p_theta_levels", + "qsi_lay", + "qsl_lay", +] + + +class CompilerDirective(): + """ + Custom compiler directive class to avoid an issue + with fparser.two.Fortran2003.Directive that will + be resolved in an upcoming fparser release. + """ + def __init__(self, directive): + self.directive = directive + + def tofortran(self): + """ + Return directive with prefix + """ + return "!DIR$ " + self.directive + + +def trans(psyir): + """ + Apply OpenMP and Compiler Directives + """ + + # Declare subroutines as pure to enable parallelisation + # of the encompassing loops + set_pure_subroutines(psyir, pure_subroutines) + + # Identify outer loops for setting up parallel regions + outer_loops = [loop for loop in get_outer_loops(psyir) + if not loop.ancestor(Loop)] + + # Check if first OpenMP region can be parallelised and + # apply directives + try: + OMP_PARALLEL_REGION_TRANS.validate(outer_loops[0:2]) + OMP_PARALLEL_REGION_TRANS.apply(outer_loops[0:2]) + OMP_DO_LOOP_TRANS_STATIC.apply(outer_loops[0]) + OMP_DO_LOOP_TRANS_STATIC.apply(outer_loops[1].walk(Loop)[1]) + except (TransformationError, IndexError) as err: + logging.warning("Parallelisation of the 1st region failed: %s", err) + + # Declare private symbols for the last loop nest explicitly, + # PSyclone misses one + mark_explicit_privates(outer_loops[2], private_variables) + + # Parallelise the second region and insert compiler directives + # Add redundant variable initialisation to work around a known + # PSyclone issue when using CCE + try: + if get_compiler() == 'cce': + first_priv_red_init(outer_loops[2], ["i", "j", "k"]) + + OMP_PARALLEL_REGION_TRANS.validate(outer_loops[2:3]) + OMP_PARALLEL_REGION_TRANS.apply(outer_loops[2]) + + # Insert before OpenMP directives to avoid PSyclone errors + if get_compiler() == "cce": + for loop in outer_loops[2].walk(Loop)[3:5]: + cblock = CodeBlock([CompilerDirective("NOFISSION")], + CodeBlock.Structure.STATEMENT) + insert_at = loop.parent.children.index(loop) + loop.parent.children.insert(insert_at, cblock) + + for loop in outer_loops[2].walk(Loop)[13:16]: + cblock = CodeBlock([CompilerDirective("IVDEP")], + CodeBlock.Structure.STATEMENT) + insert_at = loop.parent.children.index(loop) + loop.parent.children.insert(insert_at, cblock) + + for loop in outer_loops[2].walk(Loop)[2:7]: + # Check if any eligible variables appear in subroutine + # call arguments; these lead to false dependency errors + # in the parallel loop transformation that can be + # ignored + ignore_deps_vars = match_call_args(loop, false_dep_vars) + options = {} + if len(ignore_deps_vars) > 0: + options["ignore_dependencies_for"] = ignore_deps_vars + OMP_DO_LOOP_TRANS_STATIC.apply(loop, options) + + for loop in outer_loops[2].walk(Loop)[8:13:2]: + # Check if any eligible variables appear on the LHS of + # assignment expressions to ignore false dependency errors + ignore_deps_vars = match_lhs_assignments(loop, false_dep_vars) + options = {} + if len(ignore_deps_vars) > 0: + options["ignore_dependencies_for"] = ignore_deps_vars + + OMP_DO_LOOP_TRANS_STATIC.apply(loop, options) + + except (TransformationError, IndexError) as err: + logging.warning("Parallelisation of the 2nd region failed: %s", err) diff --git a/applications/ngarch/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_initiation_ctl.py b/applications/ngarch/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_initiation_ctl.py new file mode 100644 index 000000000..f0d19a243 --- /dev/null +++ b/applications/ngarch/optimisation/esnz-cascade/transmute/large_scale_cloud/pc2_initiation_ctl.py @@ -0,0 +1,37 @@ +############################################################################## +# (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. +############################################################################## +""" +Optimisation script that replaces existing OpenMP parallelisation with +PSyclone-generated directives to parallelise additional loops. +""" + +import logging +from psyclone.transformations import TransformationError +from psyclone.psyir.nodes import Loop +from transmute_psytrans.transmute_functions import ( + get_outer_loops, + OMP_PARALLEL_LOOP_DO_TRANS_STATIC, +) + + +def trans(psyir): + """ + Apply OpenMP Directives + """ + + # Identify outer loops in the subroutine + outer_loops = [loop for loop in get_outer_loops(psyir) + if not loop.ancestor(Loop)] + + try: + # Parallelise k-loops and i-loops (j-loops have a trip count of 1) + for loop in outer_loops: + if loop.variable.name == 'k': + OMP_PARALLEL_LOOP_DO_TRANS_STATIC.apply(loop) + elif loop.variable.name == 'j': + OMP_PARALLEL_LOOP_DO_TRANS_STATIC.apply(loop.walk(Loop)[1]) + except (TransformationError, IndexError) as err: + logging.warning("OMPParallelLoopTrans failed: %s", err) diff --git a/applications/ngarch/rose-meta/lfric-ngarch/version30_31.py b/applications/ngarch/rose-meta/lfric-ngarch/version30_31.py new file mode 100644 index 000000000..642cfe160 --- /dev/null +++ b/applications/ngarch/rose-meta/lfric-ngarch/version30_31.py @@ -0,0 +1,207 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/ngarch/rose-meta/lfric-ngarch/vn3.1/rose-meta.conf new file mode 100644 index 000000000..0d4e795f6 --- /dev/null +++ b/applications/ngarch/rose-meta/lfric-ngarch/vn3.1/rose-meta.conf @@ -0,0 +1,19 @@ +import=lfric-gungho/vn3.1 + +[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/version30_31.py b/applications/shallow_water/rose-meta/lfric-shallow_water/version30_31.py new file mode 100644 index 000000000..0758727f6 --- /dev/null +++ b/applications/shallow_water/rose-meta/lfric-shallow_water/version30_31.py @@ -0,0 +1,207 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/shallow_water/rose-meta/lfric-shallow_water/vn3.1/rose-meta.conf new file mode 100644 index 000000000..806760109 --- /dev/null +++ b/applications/shallow_water/rose-meta/lfric-shallow_water/vn3.1/rose-meta.conf @@ -0,0 +1,136 @@ +import=lfric-gungho/vn3.1 + +[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/shallow_water/source/driver/shallow_water_model_mod.F90 b/applications/shallow_water/source/driver/shallow_water_model_mod.F90 index f2706ce97..48de3152c 100644 --- a/applications/shallow_water/source/driver/shallow_water_model_mod.F90 +++ b/applications/shallow_water/source/driver/shallow_water_model_mod.F90 @@ -83,6 +83,7 @@ subroutine initialise_infrastructure( program_name, modeldb) character(str_def), allocatable :: base_mesh_names(:) character(str_def), allocatable :: twod_names(:) + integer(i_def), allocatable :: stencil_depths(:) class(extrusion_type), allocatable :: extrusion type(uniform_extrusion_type), allocatable :: extrusion_2d @@ -93,7 +94,6 @@ subroutine initialise_infrastructure( program_name, modeldb) character(str_def) :: prime_mesh_name - integer(i_def) :: stencil_depth integer(i_def) :: geometry integer(i_def) :: method integer(i_def) :: number_of_layers @@ -180,12 +180,15 @@ subroutine initialise_infrastructure( program_name, modeldb) ! Initialise prime/2d meshes ! --------------------------------------------------------- check_partitions = .false. - stencil_depth = get_required_stencil_depth() + allocate(stencil_depths(size(base_mesh_names))) + call get_required_stencil_depth( & + stencil_depths, base_mesh_names, modeldb%configuration & + ) call init_mesh( modeldb%configuration, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, extrusion, & - stencil_depth, check_partitions ) + stencil_depths, check_partitions ) allocate( twod_names, source=base_mesh_names ) @@ -222,6 +225,8 @@ subroutine initialise_infrastructure( program_name, modeldb) call create_runtime_constants() deallocate(base_mesh_names) + deallocate(twod_names) + deallocate(stencil_depths) nullify(chi_inventory, panel_id_inventory) end subroutine initialise_infrastructure diff --git a/applications/shallow_water/source/kernel/initial_swe_streamfunc_kernel_mod.F90 b/applications/shallow_water/source/kernel/initial_swe_streamfunc_kernel_mod.F90 index 26df19f6e..b9221ca88 100644 --- a/applications/shallow_water/source/kernel/initial_swe_streamfunc_kernel_mod.F90 +++ b/applications/shallow_water/source/kernel/initial_swe_streamfunc_kernel_mod.F90 @@ -18,8 +18,13 @@ module initial_swe_streamfunc_kernel_mod use constants_mod, only : r_def, i_def, PI use fs_continuity_mod, only : W1 use kernel_mod, only : kernel_type + + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius use shallow_water_settings_config_mod, & - only : swe_test + only: swe_test implicit none @@ -86,8 +91,6 @@ subroutine initial_swe_streamfunc_code(nlayers, rhs, chi_1, chi_2, chi_3, panel_ use analytic_swe_streamfunction_profiles_mod, & only: analytic_swe_streamfunction - use base_mesh_config_mod, only: geometry, & - geometry_spherical use sci_coordinate_jacobian_mod, only: coordinate_jacobian, & coordinate_jacobian_inverse use coord_transform_mod, only: sphere2cart_vector @@ -135,7 +138,11 @@ subroutine initial_swe_streamfunc_code(nlayers, rhs, chi_1, chi_2, chi_3, panel_ chi_3_cell(df) = chi_3( map_chi(df) ) end do - call coordinate_jacobian( ndf_chi, & + call coordinate_jacobian( coord_system, & + geometry, & + topology, & + scaled_radius, & + ndf_chi, & nqp_h, & nqp_v, & chi_1_cell, & diff --git a/applications/shallow_water/source/kernel/initial_swe_u_kernel_mod.F90 b/applications/shallow_water/source/kernel/initial_swe_u_kernel_mod.F90 index fbad6cef9..6d93ab3d9 100644 --- a/applications/shallow_water/source/kernel/initial_swe_u_kernel_mod.F90 +++ b/applications/shallow_water/source/kernel/initial_swe_u_kernel_mod.F90 @@ -19,13 +19,17 @@ module initial_swe_u_kernel_mod ANY_DISCONTINUOUS_SPACE_3 use constants_mod, only : r_def, PI, i_def use fs_continuity_mod, only : W2 - use initial_wind_config_mod, only : profile_sin_uv, & - profile, sbr_angle_lat, sbr_angle_lon, & - u0, v0, shear, wavelength - use kernel_mod, only : kernel_type + + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical + use finite_element_config_mod, only: coord_system + use initial_wind_config_mod, only: profile_sin_uv, & + profile, sbr_angle_lat, sbr_angle_lon, & + u0, v0, shear, wavelength + use planet_config_mod, only: scaled_radius use shallow_water_settings_config_mod, & - only : swe_test + only: swe_test implicit none @@ -94,8 +98,6 @@ subroutine initial_swe_u_code( nlayers, rhs, & nqp_h, nqp_v, wqp_h, wqp_v ) use analytic_swe_wind_profiles_mod, only : analytic_swe_wind - use base_mesh_config_mod, only : geometry, & - geometry_spherical use sci_coordinate_jacobian_mod, only : coordinate_jacobian use coord_transform_mod, only : sphere2cart_vector use sci_chi_transform_mod, only : chi2llr, chi2xyz @@ -142,7 +144,11 @@ subroutine initial_swe_u_code( nlayers, rhs, & chi_3_cell(df) = chi_3( map_chi(df) ) end do - call coordinate_jacobian(ndf_chi, & + call coordinate_jacobian( coord_system, & + geometry, & + topology, & + scaled_radius, & + ndf_chi, & nqp_h, & nqp_v, & chi_1_cell, & diff --git a/applications/shallow_water/source/kernel/initial_vorticity_v2_kernel_mod.F90 b/applications/shallow_water/source/kernel/initial_vorticity_v2_kernel_mod.F90 index 4cb12608c..f5a5b5c26 100644 --- a/applications/shallow_water/source/kernel/initial_vorticity_v2_kernel_mod.F90 +++ b/applications/shallow_water/source/kernel/initial_vorticity_v2_kernel_mod.F90 @@ -25,12 +25,13 @@ module initial_vorticity_v2_kernel_mod use kernel_mod, only: kernel_type use sci_coordinate_jacobian_mod, only: coordinate_jacobian, & coordinate_jacobian_inverse - use base_mesh_config_mod, only: geometry, & - geometry_spherical, & - f_lat use rotation_vector_mod, only: rotation_vector_fplane, & rotation_vector_sphere - use planet_config_mod, only: scaled_omega + + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical, f_lat + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius, scaled_omega implicit none @@ -165,7 +166,11 @@ subroutine initial_vorticity_v2_code(nlayers, r_q, curl_u, geopot, & rotation_vector) end if - call coordinate_jacobian(ndf_chi, & + call coordinate_jacobian(coord_system, & + geometry, & + topology, & + scaled_radius, & + ndf_chi, & nqp_h, & nqp_v, & chi_1_e, & diff --git a/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf index fe44262b4..75d5fe402 100644 --- a/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_geopot_kernel_mod_test.pf @@ -96,7 +96,7 @@ contains swe_test = swe_test_swe_geostr_balance, & thermal_swe = .false. ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf index 3c69d79cb..02ca8474e 100644 --- a/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_swe_buoyancy_kernel_mod_test.pf @@ -97,7 +97,7 @@ contains swe_test = swe_test_swe_gaussian_hill, & thermal_swe = .false.) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf index 29103cf75..2e69572db 100644 --- a/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_swe_tracer_kernel_mod_test.pf @@ -96,7 +96,7 @@ contains swe_test = swe_test_swe_geostr_balance, & thermal_swe = .false. ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf b/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf index 846105876..df091a7f8 100644 --- a/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf +++ b/applications/shallow_water/unit-test/kernel/initial_swe_u_kernel_mod_test.pf @@ -96,7 +96,7 @@ contains swe_test = swe_test_swe_gaussian_hill, & ref_gp = 10000.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine setUp diff --git a/applications/solver/rose-meta/lfric-solver/version30_31.py b/applications/solver/rose-meta/lfric-solver/version30_31.py new file mode 100644 index 000000000..ff0459300 --- /dev/null +++ b/applications/solver/rose-meta/lfric-solver/version30_31.py @@ -0,0 +1,43 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/solver/rose-meta/lfric-solver/vn3.1/rose-meta.conf new file mode 100644 index 000000000..e068d8a6e --- /dev/null +++ b/applications/solver/rose-meta/lfric-solver/vn3.1/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/solver/source/solver.F90 b/applications/solver/source/solver.F90 index 9c06cb220..197472851 100644 --- a/applications/solver/source/solver.F90 +++ b/applications/solver/source/solver.F90 @@ -86,7 +86,7 @@ program solver character(str_def) :: prime_mesh_name - integer(i_def) :: stencil_depth + integer(i_def) :: stencil_depth(1) integer(i_def) :: geometry integer(i_def) :: method integer(i_def) :: number_of_layers diff --git a/applications/transport/rose-meta/lfric-transport/version30_31.py b/applications/transport/rose-meta/lfric-transport/version30_31.py new file mode 100644 index 000000000..f024bde13 --- /dev/null +++ b/applications/transport/rose-meta/lfric-transport/version30_31.py @@ -0,0 +1,207 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/applications/transport/rose-meta/lfric-transport/vn3.1/rose-meta.conf new file mode 100644 index 000000000..7f6586436 --- /dev/null +++ b/applications/transport/rose-meta/lfric-transport/vn3.1/rose-meta.conf @@ -0,0 +1,125 @@ +import=lfric-gungho/vn3.1 + +#============================================================================== +# 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/applications/transport/source/driver/transport_driver_mod.f90 b/applications/transport/source/driver/transport_driver_mod.f90 index c21bb94bd..5cfc4f465 100644 --- a/applications/transport/source/driver/transport_driver_mod.f90 +++ b/applications/transport/source/driver/transport_driver_mod.f90 @@ -126,6 +126,7 @@ subroutine initialise_transport( program_name, modeldb ) character(len=str_def), allocatable :: chain_mesh_tags(:) character(len=str_def) :: aerosol_mesh_name character(len=str_def) :: prime_mesh_name + integer(kind=i_def), allocatable :: stencil_depths(:) logical(kind=l_def) :: use_multires_coupling logical(kind=l_def) :: l_multigrid @@ -133,7 +134,6 @@ subroutine initialise_transport( program_name, modeldb ) logical(kind=l_def) :: apply_partition_check integer(kind=i_def) :: geometry - integer(kind=i_def) :: stencil_depth real(kind=r_def) :: domain_bottom real(kind=r_def) :: domain_height real(kind=r_def) :: scaled_radius @@ -284,7 +284,11 @@ subroutine initialise_transport( program_name, modeldb ) ! 1.3a Initialise prime/2d meshes ! --------------------------------------------------------- - stencil_depth = get_required_stencil_depth() + allocate(stencil_depths(num_base_meshes)) + call get_required_stencil_depth( & + stencil_depths, base_mesh_names, modeldb%configuration & + ) + apply_partition_check = .false. if ( .not. prepartitioned .and. & ( l_multigrid .or. use_multires_coupling ) ) then @@ -295,7 +299,7 @@ subroutine initialise_transport( program_name, modeldb ) modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, & - extrusion, stencil_depth, & + extrusion, stencil_depths, & apply_partition_check ) call create_mesh( base_mesh_names, extrusion_2d, & @@ -447,11 +451,20 @@ subroutine initialise_transport( program_name, modeldb ) end if - if (allocated(base_mesh_names)) deallocate(base_mesh_names) - if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) - if (allocated(meshes_to_double)) deallocate(meshes_to_double) - + if (allocated(base_mesh_names)) deallocate(base_mesh_names) + if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) + if (allocated(meshes_to_double)) deallocate(meshes_to_double) + if (allocated(twod_names)) deallocate(twod_names) + if (allocated(shifted_names)) deallocate(shifted_names) + if (allocated(double_names)) deallocate(double_names) + if (allocated(extrusion)) deallocate(extrusion) + if (allocated(extrusion_2d)) deallocate(extrusion_2d) + if (allocated(extrusion_shifted)) deallocate(extrusion_shifted) + if (allocated(extrusion_double)) deallocate(extrusion_double) + if (allocated(chain_mesh_tags)) deallocate(chain_mesh_tags) + if (allocated(stencil_depths)) deallocate(stencil_depths) if (allocated(extra_io_mesh_names)) deallocate(extra_io_mesh_names) + nullify(chi_inventory, panel_id_inventory, mesh, aerosol_mesh) end subroutine initialise_transport diff --git a/applications/transport/source/kernel/set_tracer_field_kernel_mod.F90 b/applications/transport/source/kernel/set_tracer_field_kernel_mod.F90 index 7e06eaea4..e6cd86ab4 100644 --- a/applications/transport/source/kernel/set_tracer_field_kernel_mod.F90 +++ b/applications/transport/source/kernel/set_tracer_field_kernel_mod.F90 @@ -18,10 +18,14 @@ module set_tracer_field_kernel_mod GH_QUADRATURE_XYoZ use fs_continuity_mod, only : Wchi use constants_mod, only : r_def, i_def - use idealised_config_mod, only : test use kernel_mod, only : kernel_type use log_mod, only : log_event, LOG_LEVEL_ERROR + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use idealised_config_mod, only: test + use planet_config_mod, only: scaled_radius + implicit none private @@ -148,7 +152,9 @@ subroutine set_tracer_field_code(nlayers, tracer, & chi_2_e(df1) = chi_2( map_chi(df1) + k ) chi_3_e(df1) = chi_3( map_chi(df1) + k ) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi_1_e, chi_2_e, chi_3_e, & ipanel, chi_basis, chi_diff_basis, & jac, dj) diff --git a/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf b/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf index 7fcd8dc18..851d10191 100644 --- a/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf +++ b/applications/transport/unit-test/kernel/initial_tracer_field_sample_kernel_mod_test.pf @@ -82,7 +82,7 @@ contains f_lon_deg=0.0_r_def, perturb_init=.false., & perturb_magnitude=0, perturb_seed=0 ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine setUp diff --git a/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf b/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf index 04e00da19..12e83028f 100644 --- a/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf +++ b/applications/transport/unit-test/kernel/set_tracer_field_kernel_mod_test.pf @@ -103,7 +103,7 @@ contains p_zero=100000.0_r_def, & scaling_factor=1.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine set_up diff --git a/build/extract/extract_physics.mk b/build/extract/extract_physics.mk index a4df2535b..7e43cd1b0 100644 --- a/build/extract/extract_physics.mk +++ b/build/extract/extract_physics.mk @@ -20,7 +20,4 @@ extract: # Retrieve and preprocess the UKCA and CASIM code - 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/ - + python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(WORKING_DIR) -e $(APPS_ROOT_DIR)/build/extract/extract.yaml diff --git a/build/extract/extract_science.py b/build/extract/extract_science.py index 042fe6f32..845b87b01 100755 --- a/build/extract/extract_science.py +++ b/build/extract/extract_science.py @@ -1,35 +1,12 @@ import argparse -import subprocess import os -import tempfile import yaml -from shutil import rmtree from pathlib import Path -from typing import Dict, List +from get_git_sources import clone_and_merge, run_command +import logging -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: +def load_yaml(fpath: Path) -> dict: """ Read in the dependencies.yaml file """ @@ -40,56 +17,45 @@ def load_yaml(fpath: Path) -> Dict: 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): +def extract_files(dependencies: dict, extract_lists: dict, working: Path) -> None: """ 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}" + mirror_loc = os.getenv("MIRROR_LOC", "") + use_mirrors = bool(mirror_loc) + mirror_loc = Path(mirror_loc) + + for dependency, sources in dependencies.items(): + if dependency not in extract_lists: + continue + files = extract_lists[dependency] + + # If the PHYSICS_ROOT environment variable is provided, then use sources there + if "PHYSICS_ROOT" in os.environ and Path(os.environ["PHYSICS_ROOT"]).exists(): + clone_loc = Path(os.environ["PHYSICS_ROOT"]) / dependency + else: + clone_loc = working.parent / "scratch" / dependency + clone_and_merge(dependency, sources, clone_loc, use_mirrors, mirror_loc) + + # make the working directory location + working_dir = working / dependency + working_dir.mkdir(parents=True, exist_ok=True) + + # rsync extract files from clone loc to the working directory + copy_command = "rsync --include='**/' " + for extract_file in files: + if not extract_file: + continue + if Path(clone_loc / extract_file).is_dir(): + extract_file = extract_file.rstrip("/") + extract_file += "/**" + copy_command += f"--include='{extract_file}' " + copy_command += f"--exclude='*' -avmq {clone_loc}/ {working_dir}" run_command(copy_command) - rmtree(tempdir) - def parse_args() -> argparse.Namespace: """ @@ -101,34 +67,30 @@ def parse_args() -> argparse.Namespace: "-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." + help="The dependencies file for the apps working copy", ) + parser.add_argument("-w", "--working", default=".", help="Build location") parser.add_argument( "-e", "--extract", default="./extract.yaml", help="Path to file containing extract lists", ) - return parser.parse_args() + + args = parser.parse_args() + args.working = Path(args.working) + return 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), - ) + logging.basicConfig(level=logging.INFO) + + extract_lists: dict = load_yaml(args.extract) + dependencies: dict = load_yaml(args.dependencies) + + extract_files(dependencies, extract_lists, args.working) if __name__ == "__main__": diff --git a/build/extract/get_git_sources.py b/build/extract/get_git_sources.py new file mode 100644 index 000000000..4bf5fd632 --- /dev/null +++ b/build/extract/get_git_sources.py @@ -0,0 +1,402 @@ +# ----------------------------------------------------------------------------- +# (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. +# ----------------------------------------------------------------------------- +""" +Helper functions for cloning git sources in command line builds +""" + +import re +import subprocess +from datetime import datetime +from typing import Optional, Union +from pathlib import Path +from shutil import rmtree +import shlex +import logging + +logger = logging.getLogger(__name__) + + +def run_command( + command: str, check: bool = True, capture: bool = True, timeout: int = 600 +) -> Optional[subprocess.CompletedProcess]: + """ + Run a subprocess command and return the result object + Inputs: + - command, str with command to run + Outputs: + - result object from subprocess.run + """ + + args = shlex.split(command) + + try: + result = subprocess.run( + args, + capture_output=capture, + text=capture, + timeout=timeout, + shell=False, + check=False, + ) + if check and result.returncode != 0: + err_msg = (result.stderr or "").strip() + logger.error(f"[FAIL] Command failed: {command}\nError: {err_msg}") + raise subprocess.CalledProcessError( + result.returncode, args, output=result.stdout, stderr=result.stderr + ) + return result + + except (subprocess.TimeoutExpired, FileNotFoundError) as e: + logger.error(f"[FAIL] Execution error for '{args[0]}': {e}") + raise + + +def validate_dependencies(dependencies: dict) -> None: + """ + Check that the dependencies file dictionary matches format expectations. + Each dictionary value should be a list of dictionaries (or a single dictionary) + Those dictionaries should have a "source" and a "ref" key + """ + for item, values in dependencies.items(): + failed = False + if isinstance(values, dict): + values = [values] + if not isinstance(values, list): + failed = True + else: + for entry in values: + if not isinstance(entry, dict) or ( + "source" not in entry or "ref" not in entry + ): + failed = True + if failed: + raise ValueError( + f"The dependency {item} does not contain a list of dictionaries (or a " + "single dictionary) with keys of 'source' and 'ref'.\nPlease edit your " + "dependencies.yaml file to satisfy this." + ) + + +def datetime_str() -> str: + """ + Create and return a datetime string at the current time + """ + return datetime.now().strftime("%Y-%m-%d %H:%M:%S") + + +def clone_and_merge( + dependency: str, opts: Union[list, dict], loc: Path, use_mirrors: bool, mirror_loc: Path +) -> None: + """ + Wrapper script for calling get_source and merge_source for a single dependency + + dependency: name of the dependency + opts: dict or list of dicts for a dependency in the dependencies file + loc: path to location to clone to + use_mirrors: bool, use local git mirrors if true + mirror_loc: path to local git mirrors + """ + + if not isinstance(opts, list): + opts = [opts] + + for i, values in enumerate(opts): + if values["ref"] is None: + values["ref"] = "" + + # Clone the first provided source + if i == 0: + get_source( + values["source"], + values["ref"], + loc, + dependency, + use_mirrors, + mirror_loc, + ) + # For all other sources, attempt to merge into the first + else: + merge_source( + values["source"], + values["ref"], + loc, + dependency, + use_mirrors, + mirror_loc, + ) + + +def get_source( + source: str, + ref: str, + dest: Path, + repo: str, + use_mirrors: bool = False, + mirror_loc: Path = Path(""), +) -> None: + """ + Call functions to clone or rsync git source + """ + + if ".git" in source: + if use_mirrors: + logger.info( + f"[{datetime_str()}] Cloning {repo} from {mirror_loc} at ref {ref}" + ) + mirror_loc = Path(mirror_loc) / "MetOffice" / repo + clone_repo_mirror(source, ref, mirror_loc, dest) + else: + logger.info(f"[{datetime_str()}] Cloning {repo} from {source} at ref {ref}") + clone_repo(source, ref, dest) + else: + logger.info(f"[{datetime_str()}] Syncing {repo} at ref {ref}") + sync_repo(source, ref, dest) + + +def merge_source( + source: str, + ref: str, + dest: Path, + repo: str, + use_mirrors: bool = False, + mirror_loc: Path = Path(""), +) -> None: + """ + Merge git source into a local git clone. Assumes dest is a git clone that this + source can be merged into. + """ + + logger.info( + f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] Merging " + f"{source} at ref {ref} into {repo}" + ) + + if use_mirrors: + remote_path = Path(mirror_loc) / "MetOffice" / repo + else: + remote_path = source + run_command(f"git -C {dest} remote add local {remote_path}") + + if use_mirrors: + fetch = determine_mirror_fetch(source, ref) + else: + fetch = ref + + run_command(f"git -C {dest} fetch local {fetch}") + command = f"git -C {dest} merge --no-gpg-sign FETCH_HEAD" + result = run_command(command, check=False) + if result.returncode: + unmerged_files = get_unmerged(dest) + if unmerged_files: + handle_merge_conflicts(source, ref, dest, repo) + else: + raise subprocess.CalledProcessError( + result.returncode, command, result.stdout, result.stderr + ) + + # Remove the added remote + run_command(f"git -C {dest} remote remove local") + + +def handle_merge_conflicts(source: str, ref: str, loc: Path, dependency: str) -> None: + """ + If merge conflicts are in `rose-stem/` or `dependencies.yaml` then accept the + current changes and mark as resolved. + If others remain then raise an error + """ + + # For suites, merge conflicts in these files/directories are unimportant so accept + # the current changes + for filepath in ("dependencies.yaml", "rose-stem"): + logger.warning(f"Ignoring merge conflicts in {filepath}") + run_command(f"git -C {loc} checkout --ours -- {filepath}") + run_command(f"git -C {loc} add {filepath}") + + # Check if there are any remaining merge conflicts + unmerged = get_unmerged(loc) + if unmerged: + files = "\n".join(f for f in unmerged) + raise RuntimeError( + "\nA merge conflict has been identified while merging the following branch " + f"into the {dependency} source:\n\nsource: {source}\nref: {ref}\n\n" + f"with conflicting files:{files}" + "\n\nThese will need changing in the source branches to be useable together" + ) + + +def get_unmerged(loc: Path) -> list[str]: + """ + Return list of unmerged files in a git clone + """ + + files = run_command(f"git -C {loc} --no-pager diff --name-only --diff-filter=U") + return files.stdout.split() + + +def clone_repo_mirror( + repo_source: str, + repo_ref: str, + mirror_loc: Path, + loc: Path, +) -> None: + """ + Clone a repo source using a local git mirror. + Assume the mirror is set up as per the Met Office + - repo_source: ssh url of the source repository + - repo_ref: git ref for the source. An empty string will get the default branch + - mirror_loc: path to the local git mirrors + - loc: path to clone the repository to + """ + + # If the repository exists and isn't a git repo, exit now as we don't want to + # overwrite it + if loc.exists(): + if not Path(loc / ".git").exists(): + raise RuntimeError( + f"The destination for the clone of {repo_source} already exists but " + "isn't a git directory. Exiting so as to not overwrite it." + ) + + # Clone if the repo doesn't exist + else: + command = f"git clone {mirror_loc} {loc}" + run_command(command) + + # If not provided a ref, pull the latest repository and return + if not repo_ref: + run_command(f"git -C {loc} pull") + return + + fetch = determine_mirror_fetch(repo_source, repo_ref) + commands = ( + f"git -C {loc} fetch origin {fetch}", + f"git -C {loc} checkout FETCH_HEAD", + ) + for command in commands: + run_command(command) + + +def determine_mirror_fetch(repo_source: str, repo_ref: str) -> str: + """ + Determine the fetch ref for the git mirrors + """ + + repo_source = repo_source.removeprefix("git@github.com:") + user = repo_source.split("/")[0] + # Check that the user is different to the Upstream User + if "MetOffice" in user: + user = None + + # If the ref is a hash then we don't need the fork user as part of the fetch. + # Equally, if the user is the Upstream User, it's not needed + if not user or re.match(r"^\s*([0-9a-f]{40})\s*$", repo_ref): + fetch = repo_ref + else: + fetch = f"{user}/{repo_ref}" + + return fetch + + +def clone_repo(repo_source: str, repo_ref: str, loc: Path) -> None: + """ + Clone the repo and checkout the provided ref + Only if a remote source + - repo_source: ssh url of the source repository + - repo_ref: git ref for the source. An empty string will get the default branch + - loc: path to clone the repository to + """ + + if not loc.exists(): + # Create a clean clone location + loc.mkdir(parents=True) + + # This process is equivalent to doing a git clone + # It saves a small amount of space by not fetching all refs + commands = ( + f"git -C {loc} init", + f"git -C {loc} remote add origin {repo_source}", + f"git -C {loc} fetch origin {repo_ref}", + f"git -C {loc} checkout FETCH_HEAD", + f"git -C {loc} fetch origin main:main", + ) + for command in commands: + run_command(command) + else: + commands = ( + f"git -C {loc} fetch origin {repo_ref}", + f"git -C {loc} checkout FETCH_HEAD", + ) + for command in commands: + run_command(command) + + +def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None: + """ + Rsync a local git clone and checkout the provided ref + """ + + # Remove if this clone already exists + if loc.exists(): + rmtree(loc) + + # Create a clean clone location + loc.mkdir(parents=True) + + exclude_dirs = [] + try: + host, path = repo_source.split(":", 1) + result = run_command(f"ssh {host} git -C {path} status --ignored -s") + except ValueError: + # In case the path does not contain `host:` - see if it can be accessed locally + result = run_command(f"git -C {repo_source} status --ignored -s") + for ignore_file in result.stdout.split("\n"): + ignore_file = ignore_file.strip() + if not ignore_file.startswith("!!"): + continue + ignore_file = ignore_file.removeprefix("!!").strip() + exclude_dirs.append(ignore_file) + + # Trailing slash required for rsync + command = f"rsync -av {repo_source}/ {loc}" + for item in exclude_dirs: + command = f"{command} --exclude '{item}'" + run_command(command) + + # Fetch the main branch from origin + # Ignore errors - these are likely because the main branch already exists + # Instead write them as warnings + command = f"git -C {loc} fetch origin main:main" + result = run_command(command, check=False) + if result and result.returncode: + logger.warning( + "Fetching main from origin resulted in an error." + "This is likely due to the main branch already existing" + f"\nError message:\n\n{result.stderr}" + ) + + if repo_ref: + command = f"git -C {loc} checkout {repo_ref}" + run_command(command) + + +def set_https(dependencies: dict) -> dict: + """ + Change sources in a dependencies dictionary to use https instead of ssh + """ + + logger.info("Modifying Dependencies to use https") + for dependency, opts in dependencies.items(): + if not isinstance(opts, list): + opts = [opts] + for i, values in enumerate(opts): + if values["source"].startswith("git@github.com:"): + values["source"] = values["source"].replace( + "git@github.com:", "https://github.com/" + ) + opts[i] = values + dependencies[dependency] = opts + + return dependencies diff --git a/build/local_build.py b/build/local_build.py index 988efe3e6..7f66e614c 100755 --- a/build/local_build.py +++ b/build/local_build.py @@ -17,8 +17,9 @@ import subprocess import argparse import yaml +import logging from pathlib import Path -import shutil +from extract.get_git_sources import clone_and_merge def subprocess_run(command): @@ -47,7 +48,7 @@ def get_root_path(): Get the root path of the current working copy """ - return os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + return Path(__file__).absolute().parent.parent def determine_core_source(root_dir): @@ -58,7 +59,7 @@ 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.yaml"), "r") as stream: + with open(root_dir / "dependencies.yaml", "r") as stream: dependencies = yaml.safe_load(stream) return dependencies["lfric_core"] @@ -72,9 +73,9 @@ def determine_project_path(project, root_dir): # Find the project in either science/ interfaces/ or applications/ for drc in ["science/", "interfaces/", "applications/"]: - path = os.path.join(root_dir, drc) + path = root_dir / drc for item in os.listdir(path): - item_path = os.path.join(path, item) + item_path = path / item if item_path and item == project: return item_path @@ -84,45 +85,6 @@ def determine_project_path(project, root_dir): ) -def clone_dependency(source, ref, temp_dep): - """ - Clone the physics dependencies into a temporary directory - """ - - 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): - """ - 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["source"].endswith(".git"): - print("Cloning LFRic Core from Github") - lfric_core_loc = Path(working_dir) / "scratch" / "core" - if lfric_core_loc.exists(): - shutil.rmtree(lfric_core_loc) - lfric_core_loc.mkdir(parents=True) - clone_dependency(core_source["source"], core_source["ref"], lfric_core_loc) - print("rsyncing the exported lfric_core source") - else: - 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" - subprocess_run(rsync_command) - - def build_makefile( root_dir, project_path, @@ -132,7 +94,6 @@ def build_makefile( target, optlevel, psyclone, - um_fcm_platform, verbose, ): """ @@ -142,21 +103,19 @@ def build_makefile( if target == "clean": working_path = working_dir else: - working_path = os.path.join(working_dir, f"{target}_{project}") + working_path = working_dir / f"{target}_{project}" print(f"Calling make command for makefile at {project_path}") make_command = ( f"make {target} -C {project_path} -j {ncores} " f"WORKING_DIR={working_path} " - f"CORE_ROOT_DIR={working_dir}/lfric_core " + f"CORE_ROOT_DIR={working_dir / 'scratch' / 'lfric_core'} " f"APPS_ROOT_DIR={root_dir} " ) if optlevel: make_command += f"PROFILE={optlevel} " if psyclone: make_command += f"PSYCLONE_TRANSFORMATION={psyclone} " - if um_fcm_platform: - make_command += f"UM_FCM_TARGET_PLATFORM={um_fcm_platform} " if verbose: make_command += "VERBOSE=1 " @@ -173,20 +132,31 @@ def main(): ) parser.add_argument( "project", - help="project to build. Will search in both " - "science and projects dirs.", + 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.", + help="Source for lfric_core. Defaults to looking in dependencies file.", + ) + parser.add_argument( + "-m", + "--mirrors", + action="store_true", + help="If true, attempts to use local git mirrors", + ) + parser.add_argument( + "--mirror_loc", + default="/data/users/gitassist/git_mirrors", + help="Location of github mirrors", ) parser.add_argument( "-w", "--working_dir", default=None, - help="Working directory where builds occur. Default to the project " + type=Path, + help="Working directory where builds occur. Defaults to the project " "directory in the working copy.", ) parser.add_argument( @@ -199,7 +169,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", @@ -215,14 +185,6 @@ def main(): help="Value passed to PSYCLONE_TRANSFORMATION variable in makefile. " "Defaults to the makefile default", ) - parser.add_argument( - "-u", - "--um_fcm_platform", - default=None, - help="Value passed to UM_FCM_TARGET_PLATFORM variable in makefile, " - "used for build settings for extracted UM physics. Defaults to the " - "makefile default.", - ) parser.add_argument( "-v", "--verbose", @@ -231,6 +193,12 @@ def main(): ) args = parser.parse_args() + logging.basicConfig(level=logging.INFO) + + # If using mirrors, set environment variable for science extract step + if args.mirrors: + os.environ["USE_MIRRORS"] = args.mirror_loc + # Find the root directory of the working copy root_dir = get_root_path() @@ -239,24 +207,26 @@ def main(): # Set the working dir default of the project directory if not args.working_dir: - args.working_dir = os.path.join(project_path, "working") + args.working_dir = Path(project_path) / "working" else: # If the working dir doesn't end in working, set that here - if not args.working_dir.strip("/").endswith("working"): - args.working_dir = os.path.join(args.working_dir, "working") - # Ensure that working_dir is an absolute path - args.working_dir = os.path.abspath(args.working_dir) - # Create the working_dir - subprocess_run(f"mkdir -p {args.working_dir}") + if not args.working_dir.name == "working": + args.working_dir = Path(args.working_dir) / "working" + # Ensure that working_dir is an absolute path and make the directory + args.working_dir = args.working_dir.resolve() + args.working_dir.mkdir(parents=True, exist_ok=True) # Determine the core source if not provided if args.core_source is None: core_source = determine_core_source(root_dir) else: - core_source = {"source": args.core_source} + core_source = {"source": args.core_source, "ref": ""} + + if not isinstance(core_source, list): + core_source = [core_source] - # Export and rsync the lfric_core source - get_lfric_core(core_source, args.working_dir) + core_loc = args.working_dir / "scratch" / "lfric_core" + clone_and_merge("lfric_core", core_source, core_loc, args.mirrors, args.mirror_loc) # Build the makefile build_makefile( @@ -268,7 +238,6 @@ def main(): args.target, args.optlevel, args.psyclone, - args.um_fcm_platform, args.verbose, ) diff --git a/dependencies.yaml b/dependencies.yaml index 16253586c..8455aefc4 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -19,11 +19,11 @@ casim: source: git@github.com:MetOffice/casim.git - ref: 2025.12.1 + ref: 2026.03.1 jules: source: git@github.com:MetOffice/jules.git - ref: 69aaf4d8e5dcf4e0134aac006b183e591aeb94d7 + ref: 2026.03.1 lfric_apps: source: @@ -31,24 +31,24 @@ lfric_apps: lfric_core: source: git@github.com:MetOffice/lfric_core.git - ref: 88533c52381b6b01c4e03910f895ad8529fae522 + ref: 2026.03.1 moci: source: git@github.com:MetOffice/moci.git - ref: 2025.12.1 + ref: 2026.03.1 SimSys_Scripts: source: git@github.com:MetOffice/SimSys_Scripts.git - ref: 2025.12.1 + ref: 2026.03.1 socrates: source: git@github.com:MetOffice/socrates.git - ref: 2025.12.1 + ref: 2026.03.1 socrates-spectral: source: git@github.com:MetOffice/socrates-spectral.git - ref: 2025.12.1 + ref: 2026.03.1 ukca: source: git@github.com:MetOffice/ukca.git - ref: 2025.12.1 + ref: 2026.03.1 diff --git a/documentation/source/developer_guide/local_builds.rst b/documentation/source/developer_guide/local_builds.rst index 9e5bd9310..c57f67e62 100644 --- a/documentation/source/developer_guide/local_builds.rst +++ b/documentation/source/developer_guide/local_builds.rst @@ -67,3 +67,19 @@ This table lists the command line arguments available: | | | will request verbose output | | | | from the makefile. | +----------------------+-----------------------------+-----------------------------+ +| ``-m --mirrors`` | False | If True, this will attempt | +| ``store_true`` | | to extract using local | +| | | github mirrors | ++----------------------+-----------------------------+-----------------------------+ +| ``--mirror-loc`` | MetOffice Mirror Location | The path to the github | +| | | mirror location | ++----------------------+-----------------------------+-----------------------------+ + +Incremental Builds +------------------ + +The local build script will attempt to build incrementally if a previous attempt +at the build exists. This should happen automatically if the working directory +is the same. If there are large changes then it may be sensible to start the +build afresh by cleaning the build ``-t clean`` (or deleting the working +directory). diff --git a/interfaces/coupled_interface/rose-meta/coupling/version30_31.py b/interfaces/coupled_interface/rose-meta/coupling/version30_31.py new file mode 100644 index 000000000..1eae88f05 --- /dev/null +++ b/interfaces/coupled_interface/rose-meta/coupling/version30_31.py @@ -0,0 +1,207 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/coupled_interface/rose-meta/coupling/vn3.1/rose-meta.conf new file mode 100644 index 000000000..47acbb91f --- /dev/null +++ b/interfaces/coupled_interface/rose-meta/coupling/vn3.1/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-gungho/vn3.1 diff --git a/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/version30_31.py b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/version30_31.py new file mode 100644 index 000000000..92966a5f6 --- /dev/null +++ b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/version30_31.py @@ -0,0 +1,282 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t182" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/vn3.1/rose-meta.conf new file mode 100644 index 000000000..a95b2cf2e --- /dev/null +++ b/interfaces/jedi_lfric_interface/rose-meta/jedi_lfric_interface/vn3.1/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-linear/vn3.1 diff --git a/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 b/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 index c7d2bb148..5a665c30d 100644 --- a/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 +++ b/interfaces/jedi_lfric_interface/source/driver/linear/jedi_lfric_linear_modeldb_driver_mod.f90 @@ -191,7 +191,7 @@ subroutine initialise_modeldb( modeldb_name, filename, mpi_obj, modeldb, atl_si_ aerosol_twod_mesh ) ! Instantiate the linearisation state - call linear_create_ls_analytic( modeldb, mesh ) + call linear_create_ls_analytic( modeldb, mesh, twod_mesh ) ! 4. Initialise the model diff --git a/interfaces/jedi_lfric_interface/source/field/jedi_lfric_linear_fields_mod.f90 b/interfaces/jedi_lfric_interface/source/field/jedi_lfric_linear_fields_mod.f90 index b1ab23597..9f7185cd5 100644 --- a/interfaces/jedi_lfric_interface/source/field/jedi_lfric_linear_fields_mod.f90 +++ b/interfaces/jedi_lfric_interface/source/field/jedi_lfric_linear_fields_mod.f90 @@ -21,7 +21,7 @@ !> ii) all three "moist_dyn" fields. !> module jedi_lfric_linear_fields_mod - use constants_mod, only : i_def, str_def, r_def + use constants_mod, only : i_def, str_def, r_def, l_def use field_mod, only : field_type use field_collection_mod, only : field_collection_type use fs_continuity_mod, only : W3, Wtheta, W2 @@ -35,6 +35,7 @@ module jedi_lfric_linear_fields_mod integer( kind=i_def ), parameter :: element_order_h = 0 integer( kind=i_def ), parameter :: element_order_v = 0 integer( kind=i_def ), parameter :: nvars = 10 + integer( kind=i_def ), parameter :: ls_nvars = 11 character( len=str_def ), parameter, public :: & variable_names(nvars) = (/'theta ', & 'exner ', & @@ -46,6 +47,18 @@ module jedi_lfric_linear_fields_mod 'm_cl ', & 'm_r ', & 'm_s '/) + character( len=str_def ), parameter, public :: & + ls_variable_names(ls_nvars) = (/'theta ', & + 'exner ', & + 'rho ', & + 'u_in_w3 ', & + 'v_in_w3 ', & + 'w_in_wth ', & + 'm_v ', & + 'm_cl ', & + 'm_r ', & + 'm_s ', & + 'land_fraction'/) integer( kind=i_def ), parameter, public :: & variable_function_spaces(nvars) = (/Wtheta, & @@ -58,6 +71,31 @@ module jedi_lfric_linear_fields_mod Wtheta, & Wtheta, & Wtheta/) + integer( kind=i_def ), parameter, public :: & + ls_variable_function_spaces(ls_nvars) = (/Wtheta, & + W3, & + W3, & + W3, & + W3, & + Wtheta, & + Wtheta, & + Wtheta, & + Wtheta, & + Wtheta, & + W3/) + + logical( kind=l_def ), parameter, public :: & + ls_variable_is_2d(ls_nvars) = (/.false., & + .false., & + .false., & + .false., & + .false., & + .false., & + .false., & + .false., & + .false., & + .false., & + .true./) public :: create_linear_fields @@ -69,33 +107,42 @@ module jedi_lfric_linear_fields_mod !> @brief Create a field collection that includes the linear model variables !> !> @param [in] mesh Pointer to a mesh object +!> @param [in] twod_mesh Pointer to a 2D mesh object !> @param [out] linear_fields A field collection that includes the linear !> fields -subroutine create_linear_fields( mesh, linear_fields ) +subroutine create_linear_fields( mesh, twod_mesh, linear_fields ) implicit none type( mesh_type ), pointer, intent(in) :: mesh + type( mesh_type ), pointer, intent(in) :: twod_mesh type( field_collection_type ), intent(out) :: linear_fields ! Local type( field_type ) :: field + type( mesh_type ), pointer :: mesh_for_field character( len=str_def ) :: variable_name integer :: i ! Setup the field_collection - call linear_fields%initialise(name = 'linear_state_trajectory', table_len = nvars) + call linear_fields%initialise(name = 'linear_state_trajectory', table_len = ls_nvars) ! Create and add the fields defined in the list of variable names - do i = 1, nvars + do i = 1, ls_nvars + + variable_name = trim(ls_variable_names(i)) - variable_name = trim(variable_names(i)) + if (ls_variable_is_2d(i)) then + mesh_for_field => twod_mesh + else + mesh_for_field => mesh + end if call field%initialise( & - vector_space = function_space_collection%get_fs(mesh, & + vector_space = function_space_collection%get_fs(mesh_for_field, & element_order_h, & element_order_v, & - variable_function_spaces(i)), & + ls_variable_function_spaces(i)), & name = variable_name ) call linear_fields%add_field( field ) diff --git a/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 b/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 index 24665d5b9..a1058e3d4 100644 --- a/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 +++ b/interfaces/jedi_lfric_interface/source/mesh/jedi_lfric_mesh_setup_mod.F90 @@ -10,6 +10,7 @@ module jedi_lfric_mesh_setup_mod use add_mesh_map_mod, only: assign_mesh_maps use base_mesh_config_mod, only: GEOMETRY_SPHERICAL, & GEOMETRY_PLANAR + use check_configuration_mod, only: get_required_stencil_depth use constants_mod, only: str_def, i_def, l_def, r_def use create_mesh_mod, only: create_mesh use driver_mesh_mod, only: init_mesh @@ -62,7 +63,7 @@ subroutine initialise_mesh( mesh_name, configuration, mpi_obj, alt_mesh_name ) integer(i_def), parameter :: one_layer = 1_i_def integer(i_def) :: geometry integer(i_def) :: extrusion_method - integer(i_def) :: stencil_depth + integer(i_def), allocatable :: stencil_depths(:) integer(i_def) :: number_of_layers integer(i_def) :: i real(r_def) :: domain_bottom @@ -122,14 +123,19 @@ subroutine initialise_mesh( mesh_name, configuration, mpi_obj, alt_mesh_name ) !------------------------------------------------------------------------- ! 1.2 Create the required meshes !------------------------------------------------------------------------- - stencil_depth = 2 + + allocate(stencil_depths(size(base_mesh_names))) + call get_required_stencil_depth( & + stencil_depths, base_mesh_names, configuration & + ) + apply_partition_check = .false. call init_mesh( configuration, & mpi_obj%get_comm_rank(), & mpi_obj%get_comm_size(), & base_mesh_names, & extrusion, & - stencil_depth, & + stencil_depths, & apply_partition_check ) allocate( twod_names, source=base_mesh_names ) @@ -140,6 +146,11 @@ subroutine initialise_mesh( mesh_name, configuration, mpi_obj, alt_mesh_name ) alt_name=twod_names ) call assign_mesh_maps(twod_names) + deallocate(twod_names) + deallocate(stencil_depths) + deallocate(extrusion) + if (allocated(extrusion_2d)) deallocate(extrusion_2d) + end subroutine initialise_mesh end module jedi_lfric_mesh_setup_mod diff --git a/interfaces/jules_interface/build/import.mk b/interfaces/jules_interface/build/import.mk index bb1c8870b..73b35d289 100644 --- a/interfaces/jules_interface/build/import.mk +++ b/interfaces/jules_interface/build/import.mk @@ -8,8 +8,7 @@ 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 - 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)/ + python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(WORKING_DIR) -e $(APPS_ROOT_DIR)/interfaces/jules_interface/build/extract.yaml # Extract the interface code $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \ diff --git a/interfaces/jules_interface/rose-meta/jules-lfric/version30_31.py b/interfaces/jules_interface/rose-meta/jules-lfric/version30_31.py new file mode 100644 index 000000000..94bd4b868 --- /dev/null +++ b/interfaces/jules_interface/rose-meta/jules-lfric/version30_31.py @@ -0,0 +1,122 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/jules_interface/rose-meta/jules-lfric/vn3.1/rose-meta.conf new file mode 100644 index 000000000..07ecf662c --- /dev/null +++ b/interfaces/jules_interface/rose-meta/jules-lfric/vn3.1/rose-meta.conf @@ -0,0 +1,181 @@ +############################################################################### +# This is the LFRic flavour of the JULES metadata +############################################################################### +# This should only contain: +# * Import statements from lfric-jules-shared. +# * LFRic specific amendments to the imported metadata. +# The majority of the metadata should be under rose-meta/lfric-jules-shared. +# +# This file in the future will reside in the JULES repository and will import +# jules-shared directly from there when the build system has been developed to +# allow this. +# +# Please see jules:wiki:SharingJULESmetadata + +import=lfric-jules-shared/jules-hydrology/vn3.1 + =lfric-jules-shared/jules-nvegparm/vn3.1 + =lfric-jules-shared/jules-pftparm/vn3.1 + =lfric-jules-shared/jules-radiation/vn3.1 + =lfric-jules-shared/jules-sea-seaice/vn3.1 + =lfric-jules-shared/jules-snow/vn3.1 + =lfric-jules-shared/jules-soil/vn3.1 + =lfric-jules-shared/jules-surface/vn3.1 + =lfric-jules-shared/jules-surface-types/vn3.1 + =lfric-jules-shared/jules-urban/vn3.1 + =lfric-jules-shared/jules-vegetation/vn3.1 + +[namelist:jules_hydrology=l_hydrology] +trigger=namelist:jules_hydrology=l_var_rainfrac: .true.; + +[namelist:jules_model_environment_lfric] +compulsory=true +description=Not all JULES options are available in all environments in which JULES is run e.g. standalone, + =UM, LFRic (LIS, MONC, CABLE). The model environment is specified here so that options that are + =unavailable can be made inaccessible via the metadata and thus will not appear in the gui. +ns=namelist/JULES Science Settings/jules_model_environment +sort-key=01 +title=Model environment interface +url=http://jules-lsm.github.io/latest/namelists/model_environment.nml.html#namelist-JULES_MODEL_ENVIRONMENT + +[namelist:jules_model_environment_lfric=l_jules_parent] +compulsory=true +description=Switch to identify the environment in which JULES is being run. + =No science code is associated with this switch, only what science options are available. + =THIS HAS TO BE LFRIC SPECIFIC FOR NOW AS A RESULT OF THE WAY THAT + =LFRIC COUPLED PROCESSES NAMELIST FILES. +!enumeration=true +fail-if=this != "'lfric'"; # This should indicate that LFRic is the parent model. +trigger=namelist:jules_surface=l_elev_land_ice: 'not_lfric'; + =namelist:jules_surface=l_elev_lw_down: 'not_lfric'; + =namelist:jules_surface=l_flake_model: 'not_lfric'; + =namelist:jules_surface=l_point_data: 'not_lfric'; +value-titles=LFRic +values='lfric' + +[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=all_tiles] +values='off','on' + +[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] +trigger=namelist:jules_surface=beta_cnv_bl: 'improved'; +value-titles=Limit Obukhov length in low winds, + =Improve initial guess (preferred) +values='lim_oblen','improved' + +[namelist:jules_surface=fd_hill_option] +value-titles=capped low hill +values='capped_lowhill' + +[namelist:jules_surface=fd_stability_dep] +value-titles=Off,Surface Ri +values='none','surf_ri' + +[namelist:jules_surface=formdrag] +fail-if= +trigger=namelist:jules_surface=orog_drag_param: 'eff_z0','dist_drag'; + =namelist:jules_surface=fd_stability_dep: 'eff_z0','dist_drag'; + =namelist:jules_surface=fd_hill_option: 'dist_drag'; +values='none','eff_z0','dist_drag' + +[namelist:jules_surface=i_modiscopt] +fail-if= +value-titles=On +values='on' + +[namelist:jules_surface=iscrntdiag] +fail-if= +value-titles=Decoupled with transitional effects +values='decoupled_trans' + +[namelist:jules_surface=l_elev_land_ice] +fail-if= +trigger= + +[namelist:jules_surface=l_flake_model] +trigger= + +[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] +fail-if= +trigger=namelist:files=soil_rough_ancil_path: .true. ; + +[namelist:jules_surface=srf_ex_cnv_gust] +fail-if= +trigger= +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/version30_31.py b/interfaces/jules_interface/rose-meta/jules-lsm/version30_31.py new file mode 100644 index 000000000..d44665eee --- /dev/null +++ b/interfaces/jules_interface/rose-meta/jules-lsm/version30_31.py @@ -0,0 +1,124 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/jules_interface/rose-meta/jules-lsm/vn3.1/rose-meta.conf new file mode 100644 index 000000000..1a4e38225 --- /dev/null +++ b/interfaces/jules_interface/rose-meta/jules-lsm/vn3.1/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.1 + +[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.1/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/vn3.1/rose-meta.conf new file mode 100644 index 000000000..782d74687 --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/vn3.1/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.1/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-nvegparm/vn3.1/rose-meta.conf new file mode 100644 index 000000000..1cb77755f --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-nvegparm/vn3.1/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.1/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-pftparm/vn3.1/rose-meta.conf new file mode 100644 index 000000000..c9486d05e --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-pftparm/vn3.1/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.1/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-radiation/vn3.1/rose-meta.conf new file mode 100644 index 000000000..2e9f46c19 --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-radiation/vn3.1/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.1/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-sea-seaice/vn3.1/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.1/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.1/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-snow/vn3.1/rose-meta.conf new file mode 100644 index 000000000..5248b8caa --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-snow/vn3.1/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.1/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-soil/vn3.1/rose-meta.conf new file mode 100644 index 000000000..49a87b62a --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-soil/vn3.1/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.1/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-surface-types/vn3.1/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.1/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.1/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-surface/vn3.1/rose-meta.conf new file mode 100644 index 000000000..210458cee --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-surface/vn3.1/rose-meta.conf @@ -0,0 +1,306 @@ +[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=all_tiles] +compulsory=true +description=Do calculations of tile properties on all tiles (except land ice) + =for all gridpoints even when the tile fraction is zero +!enumeration=true +sort-key=Panel-F10 +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::all_tiles +value-titles=Off,On +values=0,1 + +[namelist:jules_surface=anthrop_heat_mean] +compulsory=true +description=Baseline mean anthropogenic heat flux for Flanner scheme +!kind=double +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=beta1] +compulsory=true +description=Coupling coefficient for co-limitation +!kind=double +ns=namelist/JULES Science Settings/jules_surface/Parameters +sort-key=c +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::beta1 + +[namelist:jules_surface=beta2] +compulsory=true +description=Coupling coefficient for co-limitation +!kind=double +ns=namelist/JULES Science Settings/jules_surface/Parameters +sort-key=d +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::beta2 + +[namelist:jules_surface=beta_cnv_bl] +compulsory=true +description=Convective gustiness parameter in surface exchange +!kind=double +ns=namelist/JULES Science Settings/jules_surface/Parameters +range=0.0: +sort-key=Panel-F11a +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::beta_cnv_bl + +[namelist:jules_surface=cor_mo_iter] +compulsory=true +description=Corrections to Monin-Obukhov surface exchange calculation +!enumeration=true +sort-key=Panel-F11 +trigger=namelist:jules_surface=beta_cnv_bl: 4; +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_hill_option] +compulsory=true +description=Orographic form drag formulation + =NOT AVAILABLE TO STANDALONE +!enumeration=true +help=The distributed version of turbulent orographic form drag can + =use steep or low hill formulations (the steep being the one used with + =effective roughness lengths), or the low hill formulation but with + =the resulting stress capped by that generated from the steep hill + =expression +sort-key=Panel-FX01c +value-titles=steep hill,low hill,capped low hill +values=0,1,2 + +[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 +fail-if=this != 0 and namelist:jules_model_environment=l_jules_parent == 0; # In standalone formdrag should be 0 +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; + =namelist:run_stochastic=orog_drag_param_rp: 1,2; +value-titles=No orographic stress,Effective roughness,Distributed Drag +values=0,1,2 + +[namelist:jules_surface=fwe_c3] +compulsory=true +description=Factor in expressions for limitation of photosynthesis + =by transport of products for C3 grass +!kind=double +ns=namelist/JULES Science Settings/jules_surface/Parameters +sort-key=e +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::fwe_c3 + +[namelist:jules_surface=fwe_c4] +compulsory=true +description=Factor in expressions for limitation of photosynthesis + =by transport of products for C4 grass +!kind=double +ns=namelist/JULES Science Settings/jules_surface/Parameters +sort-key=f +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::fwe_c4 + +[namelist:jules_surface=hleaf] +compulsory=true +description=Specific heat capacity of leaves (J / K / kg Carbon) +!kind=double +ns=namelist/JULES Science Settings/jules_surface/Parameters +sort-key=a +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::hleaf + +[namelist:jules_surface=hwood] +compulsory=true +description=Specific heat capacity of wood (J / K / kg Carbon) +!kind=double +ns=namelist/JULES Science Settings/jules_surface/Parameters +sort-key=b +type=real +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::hwood + +[namelist:jules_surface=i_modiscopt] +compulsory=true +description=Method of discretization in the surface layer + =NOT AVAILABLE TO STANDALONE +!enumeration=true +fail-if=this !=0 and namelist:jules_model_environment=l_jules_parent == 0; # In standalone i_modiscopt should be 0 +help=Should always be 0 (i.e. off) in standalone. +sort-key=Panel-FX02 +value-titles=Off,On +values=0,1 + +[namelist:jules_surface=iscrntdiag] +compulsory=true +description=Method of diagnosing the screen temperature +!enumeration=true +fail-if=(this == 2 or this == 3) and namelist:jules_model_environment=l_jules_parent == 0; # The preferred option in standalone is 0. The decoupled option specified is not recommended until driving JULES with a decoupled variable is fully tested. +sort-key=Panel-F12 +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::iscrntdiag +value-titles=No decoupling, + =Decoupled in very stable conditions, + =Decoupled with transitional effects, + =Decoupled (T & q) with transitional effects +values=0,1,2,3 + +[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_elev_land_ice] +compulsory=true +description=Use individual tiled bedrock sub-surfaces for land ice tiles +fail-if=this and any(namelist:jules_surface_types=elev_ice < 0) and any(namelist:jules_surface_types=elev_rock < 0); # At least one of elev_ice or elev_rock needs to be used (> 0). + =this and len(namelist:jules_surface_types=elev_ice) == 0 and len(namelist:jules_surface_types=elev_rock) == 0; # At least one of elev_ice or elev_rock needs to be used (> 0). + =this and any(namelist:jules_surface_types=elev_ice < 0) and len(namelist:jules_surface_types=elev_rock) == 0; # At least one of elev_ice or elev_rock needs to be used (> 0). + =this and len(namelist:jules_surface_types=elev_ice) == 0 and any(namelist:jules_surface_types=elev_rock < 0); # At least one of elev_ice or elev_rock needs to be used (> 0). +sort-key=Panel-F04 +trigger=namelist:jules_soil=dzsoil_elev: .true.; + =namelist:jules_snow=rho_firn_albedo: .true.; + =namelist:jules_snow=aicemax: .true.; + =namelist:jules_surface_types=elev_ice: .true.; + =namelist:jules_surface_types=elev_rock: .true.; +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::l_elev_land_ice + +[namelist:jules_surface=l_elev_lw_down] +compulsory=true +description=Adjust downward longwave radiation for elevated tiles +sort-key=Panel-F05 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::l_elev_lw_down + +[namelist:jules_surface=l_epot_corr] +compulsory=true +description=Use correction to calculation of potential evaporation +sort-key=Panel-F06 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::l_epot_corr + +[namelist:jules_surface=l_flake_model] +compulsory=true +description=Use the Flake model to simulate lakes. (Not yet ready to use with Irrigation or TRIFFID) +sort-key=Panel-F13 +trigger=namelist:jules_flake: .true.; + =namelist:jules_vegetation=l_triffid: .false.; + =namelist:jules_irrig=l_irrig_dmd: .false.; +type=logical + +[namelist:jules_surface=l_land_ice_imp] +compulsory=true +description=Use implicit numerics to update land ice temperatures +sort-key=Panel-F07 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::l_land_ice_imp + +[namelist:jules_surface=l_mo_buoyancy_calc] +compulsory=true +description=Switch for using interacting buoyancy in Monin-Obukhov calculation +sort-key=Panel-F14 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::l_mo_buoyancy_calc + +[namelist:jules_surface=l_point_data] +compulsory=true +description=Using point rainfall data +sort-key=Panel-F08 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_surface.nml.html#JULES_SURFACE::l_point_data + +[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.; + =namelist:run_stochastic=z0_urban_mult_rp: .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 +fail-if=this == '.true.' and namelist:jules_model_environment=l_jules_parent == 0; # Variable roughness length of bare soil is currently not available to standalone. +!kind=default +sort-key=Panel-FX04 +type=logical + +[namelist:jules_surface=orog_drag_param] +compulsory=true +description=Drag coefficient for orographic form drag + =NOT AVAILABLE TO STANDALONE +!kind=double +range=0.01:10.0 +sort-key=Panel-FX01a +type=real + +[namelist:jules_surface=srf_ex_cnv_gust] +compulsory=true +description=Include effect of convective downdraughts on surface exchange + =NOT AVAILABLE TO STANDALONE +fail-if=this !=0 and namelist:jules_model_environment=l_jules_parent == 0; # This is not currently 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 +trigger=namelist:run_convection=cnv_cold_pools: 1; diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-urban/vn3.1/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-urban/vn3.1/rose-meta.conf new file mode 100644 index 000000000..4f1e6fb27 --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-urban/vn3.1/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.1/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-vegetation/vn3.1/rose-meta.conf new file mode 100644 index 000000000..f59be621c --- /dev/null +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-vegetation/vn3.1/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/build/transmute_psytrans/transmute_functions.py b/interfaces/physics_schemes_interface/build/transmute_psytrans/transmute_functions.py index a28728454..a6dc39106 100644 --- a/interfaces/physics_schemes_interface/build/transmute_psytrans/transmute_functions.py +++ b/interfaces/physics_schemes_interface/build/transmute_psytrans/transmute_functions.py @@ -605,6 +605,20 @@ def match_lhs_assignments(node, names): return lhs_names +def match_call_args(node, names): + """ + Check if any symbol names in list `names` appear in the + the list of subroutine arguments and return those names. + Useful for handling false dependencies. + """ + call_args = [] + for call in node.walk(Call): + for arg in call.arguments: + if hasattr(arg, "name") and arg.name in names: + call_args.append(arg.name) + return call_args + + def loop_replacement_of(routine_itr, target_name: str, init_at_start=True): diff --git a/interfaces/physics_schemes_interface/rose-meta/um-aerosol/version30_31.py b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/version30_31.py new file mode 100644 index 000000000..99148171b --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/version30_31.py @@ -0,0 +1,43 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/vn3.1/rose-meta.conf new file mode 100644 index 000000000..8fa4fa8fb --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/vn3.1/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/version30_31.py b/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/version30_31.py new file mode 100644 index 000000000..1f6b2cd54 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/version30_31.py @@ -0,0 +1,43 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/vn3.1/rose-meta.conf new file mode 100644 index 000000000..82f183e99 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-boundary_layer/vn3.1/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/version30_31.py b/interfaces/physics_schemes_interface/rose-meta/um-chemistry/version30_31.py new file mode 100644 index 000000000..0a1d9131c --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-chemistry/version30_31.py @@ -0,0 +1,43 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-chemistry/vn3.1/rose-meta.conf new file mode 100644 index 000000000..22d7661b7 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-chemistry/vn3.1/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/version30_31.py b/interfaces/physics_schemes_interface/rose-meta/um-cloud/version30_31.py new file mode 100644 index 000000000..ffd4efc4c --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-cloud/version30_31.py @@ -0,0 +1,43 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-cloud/vn3.1/rose-meta.conf new file mode 100644 index 000000000..ed341bd31 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-cloud/vn3.1/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/version30_31.py b/interfaces/physics_schemes_interface/rose-meta/um-convection/version30_31.py new file mode 100644 index 000000000..ebefea03d --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-convection/version30_31.py @@ -0,0 +1,43 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-convection/vn3.1/rose-meta.conf new file mode 100644 index 000000000..b63b84efe --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-convection/vn3.1/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/version30_31.py b/interfaces/physics_schemes_interface/rose-meta/um-iau/version30_31.py new file mode 100644 index 000000000..0318d8a76 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-iau/version30_31.py @@ -0,0 +1,43 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.1" + + 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.1/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-iau/vn3.1/rose-meta.conf new file mode 100644 index 000000000..b124f233f --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-iau/vn3.1/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/version30_31.py b/interfaces/physics_schemes_interface/rose-meta/um-microphysics/version30_31.py new file mode 100644 index 000000000..b74300787 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-microphysics/version30_31.py @@ -0,0 +1,43 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-microphysics/vn3.1/rose-meta.conf new file mode 100644 index 000000000..0c542ee37 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-microphysics/vn3.1/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/version30_31.py b/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/version30_31.py new file mode 100644 index 000000000..cb810f3ee --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/version30_31.py @@ -0,0 +1,43 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/vn3.1/rose-meta.conf new file mode 100644 index 000000000..a52082e03 --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-orographic_drag/vn3.1/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/version30_31.py b/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/version30_31.py new file mode 100644 index 000000000..22d54c15c --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/version30_31.py @@ -0,0 +1,43 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/vn3.1/rose-meta.conf new file mode 100644 index 000000000..8f9f8c2ca --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-spectral_gwd/vn3.1/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/version30_31.py b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/version30_31.py new file mode 100644 index 000000000..857b5353b --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/version30_31.py @@ -0,0 +1,43 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/vn3.1/rose-meta.conf new file mode 100644 index 000000000..957c94aad --- /dev/null +++ b/interfaces/physics_schemes_interface/rose-meta/um-stochastic_physics/vn3.1/rose-meta.conf @@ -0,0 +1,1257 @@ +#============================================================================== +# 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=The bottom pressure-level at which SKEB is active. + =A value of 1 corresponds to the lowest level of the model. +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=If the model has N layers, a value of N would correspond to the top layer. +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 at which SPT is active +help=The bottom theta-level at which SPT perturbations are applied. + =A value of 0 would correspond to the surface, so a value of 2 means that + =perturbations are applied from the third theta-level and above. + =Note that the perturbations are actually tapered, so that at the level + =specified here the perturbations will still be 0, and SPT perturbations + =effectively start at one level above this specified value. + =For more information, 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 at which SPT is active +help=The top theta-level at which SPT perturbations are applied. + =If the model has N layers, a value of N would correspond to the top + =boundary. Note that the perturbations are actually tapered, so that at the + =level specified here the perturbations will still be 0, and SPT + =perturbations effectively start at one level below this specified value. + =Though, the tapering at this level is 0 so effectively + =For more information, 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/build/import.mk b/interfaces/socrates_interface/build/import.mk index 35e5a09b3..a12f78739 100644 --- a/interfaces/socrates_interface/build/import.mk +++ b/interfaces/socrates_interface/build/import.mk @@ -8,8 +8,7 @@ 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 - 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)/ + python $(APPS_ROOT_DIR)/build/extract/extract_science.py -d $(APPS_ROOT_DIR)/dependencies.yaml -w $(WORKING_DIR) -e $(APPS_ROOT_DIR)/interfaces/socrates_interface/build/extract.yaml # Extract the interface code $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \ diff --git a/interfaces/socrates_interface/rose-meta/socrates-radiation/version30_31.py b/interfaces/socrates_interface/rose-meta/socrates-radiation/version30_31.py new file mode 100644 index 000000000..dc8f5b2db --- /dev/null +++ b/interfaces/socrates_interface/rose-meta/socrates-radiation/version30_31.py @@ -0,0 +1,55 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/interfaces/socrates_interface/rose-meta/socrates-radiation/vn3.1/rose-meta.conf new file mode 100644 index 000000000..4385576ff --- /dev/null +++ b/interfaces/socrates_interface/rose-meta/socrates-radiation/vn3.1/rose-meta.conf @@ -0,0 +1,1950 @@ +#============================================================================== +# 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_cosp_step: .true. ; + =namelist:cosp=n_subcol_gen: .true. ; +type=logical + +[namelist:cosp=n_cosp_step] +compulsory=true +description=Number of model timesteps per COSP diagnostic sampling +help=COSP will use a sunlit mask based on the length of the COSP timestep. +!kind=default +sort-key=Panel-A02 +type=integer + +[namelist:cosp=n_subcol_gen] +compulsory=true +description=Number of sub-columns for the cloud generator +!kind=default +sort-key=Panel-A03 +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/file/file_def_ls.xml b/rose-stem/app/adjoint_tests/file/file_def_ls.xml index 63e02702a..a2766a236 100644 --- a/rose-stem/app/adjoint_tests/file/file_def_ls.xml +++ b/rose-stem/app/adjoint_tests/file/file_def_ls.xml @@ -14,6 +14,7 @@ + diff --git a/rose-stem/app/adjoint_tests/file/iodef.xml b/rose-stem/app/adjoint_tests/file/iodef.xml index 0e910ff29..fb000671f 100644 --- a/rose-stem/app/adjoint_tests/file/iodef.xml +++ b/rose-stem/app/adjoint_tests/file/iodef.xml @@ -52,6 +52,11 @@ + + + + + diff --git a/rose-stem/app/adjoint_tests/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/adjoint_tests/opt/rose-app-nwp_gal9_c12.conf index 4b375741d..864c6a623 100644 --- a/rose-stem/app/adjoint_tests/opt/rose-app-nwp_gal9_c12.conf +++ b/rose-stem/app/adjoint_tests/opt/rose-app-nwp_gal9_c12.conf @@ -3,8 +3,8 @@ mode=auto source=$ROSE_SUITE_DIR/app/linear_model/file/iodef.xml [namelist:files] -ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' -ls_filename='final_ls' +ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' +ls_filename='final_ls_with_land' start_dump_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' start_dump_filename='final_pert' diff --git a/rose-stem/app/adjoint_tests/rose-app.conf b/rose-stem/app/adjoint_tests/rose-app.conf index ff2fe3086..4dafac183 100644 --- a/rose-stem/app/adjoint_tests/rose-app.conf +++ b/rose-stem/app/adjoint_tests/rose-app.conf @@ -62,6 +62,7 @@ source=(namelist:aerosol) = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging = (namelist:microphysics) = namelist:mixed_solver @@ -378,7 +379,7 @@ diag_stem_name='diagGungho' !!land_area_ancil_path='' !!lbc_directory='' !!lbc_filename='' -ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket735' +ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' ls_filename='final_2021060200-2021060207' !!no3_ancil_path='' !!o3_ancil_path='' @@ -744,13 +745,24 @@ l_spec_veg_z0=.true. [namelist:linear] fixed_ls=.true. -l_stabilise_bl=.true. +l_stabilise_bl=.false. ls_read_w2h=.false. max_bl_stabilisation=0.75 n_bl_levels_to_stabilise=15 pert_option='file' transport_efficiency=.true. +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 + [namelist:logging] log_to_rank_zero_only=.true. run_log_level='info' diff --git a/rose-stem/app/gravity_wave/rose-app.conf b/rose-stem/app/gravity_wave/rose-app.conf index 291204129..a32534553 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/vn3.0_t214 +meta=lfric-gravity_wave/vn3.1 [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 999ed6092..f1cb5c754 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/vn3.0_t214 +meta=lfric-gungho_model/vn3.1 [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 b7b83b2bf..42c17cee6 100644 --- a/rose-stem/app/jedi_forecast/rose-app.conf +++ b/rose-stem/app/jedi_forecast/rose-app.conf @@ -62,6 +62,7 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging = namelist:mixed_solver = (namelist:mixing) @@ -774,6 +775,17 @@ ls_read_w2h=.false. pert_option='analytic' transport_efficiency=.true. +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 + [namelist:logging] log_to_rank_zero_only=.true. run_log_level='info' diff --git a/rose-stem/app/jedi_forecast_pseudo/rose-app.conf b/rose-stem/app/jedi_forecast_pseudo/rose-app.conf index b99ea8c1d..5734e167c 100644 --- a/rose-stem/app/jedi_forecast_pseudo/rose-app.conf +++ b/rose-stem/app/jedi_forecast_pseudo/rose-app.conf @@ -60,6 +60,7 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging = namelist:mixed_solver = (namelist:mixing) @@ -768,6 +769,17 @@ ls_read_w2h=.false. pert_option='analytic' transport_efficiency=.true. +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 + [namelist:logging] log_to_rank_zero_only=.true. run_log_level='info' diff --git a/rose-stem/app/jedi_id_tlm_tests/file/iodef.xml b/rose-stem/app/jedi_id_tlm_tests/file/iodef.xml index d6aa75925..4a65814b5 100644 --- a/rose-stem/app/jedi_id_tlm_tests/file/iodef.xml +++ b/rose-stem/app/jedi_id_tlm_tests/file/iodef.xml @@ -41,6 +41,7 @@ + @@ -55,6 +56,7 @@ + @@ -144,6 +146,11 @@ + + + + + @@ -425,6 +432,7 @@ + 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 2d2455d41..dc2a904a2 100644 --- a/rose-stem/app/jedi_id_tlm_tests/rose-app.conf +++ b/rose-stem/app/jedi_id_tlm_tests/rose-app.conf @@ -69,6 +69,7 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging = (namelist:microphysics) = namelist:mixed_solver @@ -635,8 +636,8 @@ time_step='P0DT1H0M0S' [namelist:jedi_state] state_time='2021-06-02 00:00:00' use_pseudo_model=.true. -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', - ='m_v','m_cl','m_r','m_s' +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', + ='m_cl','m_r','m_s','land_fraction' [!!namelist:jules_hydrology] l_hydrology=.true. @@ -787,13 +788,24 @@ l_spec_veg_z0=.true. [namelist:linear] fixed_ls=.true. -l_stabilise_bl=.true. +l_stabilise_bl=.false. ls_read_w2h=.false. max_bl_stabilisation=0.75 n_bl_levels_to_stabilise=15 pert_option='file' transport_efficiency=.true. +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 + [namelist:logging] log_to_rank_zero_only=.true. run_log_level='info' diff --git a/rose-stem/app/jedi_lfric_tests/file/iodef.xml b/rose-stem/app/jedi_lfric_tests/file/iodef.xml index 371774dc6..dfb5b1345 100644 --- a/rose-stem/app/jedi_lfric_tests/file/iodef.xml +++ b/rose-stem/app/jedi_lfric_tests/file/iodef.xml @@ -50,6 +50,11 @@ + + + + + @@ -331,6 +336,7 @@ + diff --git a/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9_c12.conf index feabdeffb..0e183de1c 100644 --- a/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9_c12.conf +++ b/rose-stem/app/jedi_lfric_tests/opt/rose-app-nwp_gal9_c12.conf @@ -3,8 +3,8 @@ mode=auto source=$ROSE_SUITE_DIR/app/jedi_lfric_tests/file/iodef.xml [namelist:files] -ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' -ls_filename='final_ls' +ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' +ls_filename='final_ls_with_land' start_dump_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' start_dump_filename='final_pert' diff --git a/rose-stem/app/jedi_lfric_tests/rose-app.conf b/rose-stem/app/jedi_lfric_tests/rose-app.conf index 56d8a31fa..07157baf5 100644 --- a/rose-stem/app/jedi_lfric_tests/rose-app.conf +++ b/rose-stem/app/jedi_lfric_tests/rose-app.conf @@ -69,6 +69,7 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging = (namelist:microphysics) = namelist:mixed_solver @@ -385,7 +386,7 @@ diag_stem_name='diagGungho' !!land_area_ancil_path='' !!lbc_directory='' !!lbc_filename='' -ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket735' +ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' ls_filename='final_2021060200-2021060207' !!no3_ancil_path='' !!o3_ancil_path='' @@ -639,7 +640,7 @@ time_step='P0DT1H0M0S' state_time='2021-06-02 00:00:00' use_pseudo_model=.true. variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', - ='m_v','m_cl','m_r','m_s' + ='m_v','m_cl','m_r','m_s','land_fraction' [!!namelist:jules_hydrology] l_hydrology=.true. @@ -790,13 +791,24 @@ l_spec_veg_z0=.true. [namelist:linear] fixed_ls=.true. -l_stabilise_bl=.true. +l_stabilise_bl=.false. ls_read_w2h=.false. max_bl_stabilisation=0.75 n_bl_levels_to_stabilise=15 pert_option='file' transport_efficiency=.true. +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 + [namelist:logging] log_to_rank_zero_only=.true. run_log_level='info' diff --git a/rose-stem/app/jedi_tlm_forecast_tl/file/iodef.xml b/rose-stem/app/jedi_tlm_forecast_tl/file/iodef.xml index d6aa75925..4a65814b5 100644 --- a/rose-stem/app/jedi_tlm_forecast_tl/file/iodef.xml +++ b/rose-stem/app/jedi_tlm_forecast_tl/file/iodef.xml @@ -41,6 +41,7 @@ + @@ -55,6 +56,7 @@ + @@ -144,6 +146,11 @@ + + + + + @@ -425,6 +432,7 @@ + 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 c851697a8..b446f4c69 100644 --- a/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf +++ b/rose-stem/app/jedi_tlm_forecast_tl/rose-app.conf @@ -69,6 +69,7 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging = (namelist:microphysics) = namelist:mixed_solver @@ -635,8 +636,8 @@ time_step='P0DT1H0M0S' [namelist:jedi_state] state_time='2021-06-02 00:00:00' use_pseudo_model=.true. -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', - ='m_v','m_cl','m_r','m_s' +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', + ='m_cl','m_r','m_s','land_fraction' [!!namelist:jules_hydrology] l_hydrology=.true. @@ -787,13 +788,24 @@ l_spec_veg_z0=.true. [namelist:linear] fixed_ls=.true. -l_stabilise_bl=.true. +l_stabilise_bl=.false. ls_read_w2h=.false. max_bl_stabilisation=0.75 n_bl_levels_to_stabilise=15 pert_option='file' transport_efficiency=.true. +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 + [namelist:logging] log_to_rank_zero_only=.true. run_log_level='info' diff --git a/rose-stem/app/jedi_tlm_tests/file/iodef.xml b/rose-stem/app/jedi_tlm_tests/file/iodef.xml index d6aa75925..4a65814b5 100644 --- a/rose-stem/app/jedi_tlm_tests/file/iodef.xml +++ b/rose-stem/app/jedi_tlm_tests/file/iodef.xml @@ -41,6 +41,7 @@ + @@ -55,6 +56,7 @@ + @@ -144,6 +146,11 @@ + + + + + @@ -425,6 +432,7 @@ + diff --git a/rose-stem/app/jedi_tlm_tests/rose-app.conf b/rose-stem/app/jedi_tlm_tests/rose-app.conf index 9f63f44ad..6e8c2a776 100644 --- a/rose-stem/app/jedi_tlm_tests/rose-app.conf +++ b/rose-stem/app/jedi_tlm_tests/rose-app.conf @@ -69,6 +69,7 @@ source=namelist:jedi_lfric_tests = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging = (namelist:microphysics) = namelist:mixed_solver @@ -635,8 +636,8 @@ time_step='P0DT1H0M0S' [namelist:jedi_state] state_time='2021-06-02 00:00:00' use_pseudo_model=.true. -variables='theta','rho','u10m','exner','u_in_w3','v_in_w3','w_in_wth', - ='m_v','m_cl','m_r','m_s' +variables='theta','rho','exner','u_in_w3','v_in_w3','w_in_wth','m_v', + ='m_cl','m_r','m_s','land_fraction' [!!namelist:jules_hydrology] l_hydrology=.true. @@ -787,13 +788,24 @@ l_spec_veg_z0=.true. [namelist:linear] fixed_ls=.true. -l_stabilise_bl=.true. +l_stabilise_bl=.false. ls_read_w2h=.false. max_bl_stabilisation=0.75 n_bl_levels_to_stabilise=15 pert_option='file' transport_efficiency=.true. +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 + [namelist:logging] log_to_rank_zero_only=.true. run_log_level='info' diff --git a/rose-stem/app/jules/rose-app.conf b/rose-stem/app/jules/rose-app.conf index 019126505..52e040246 100644 --- a/rose-stem/app/jules/rose-app.conf +++ b/rose-stem/app/jules/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-jules/vn3.0_t214 +meta=lfric-jules/vn3.1 [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 ea7ab4128..3da09230b 100644 --- a/rose-stem/app/lfric2lfric/rose-app.conf +++ b/rose-stem/app/lfric2lfric/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-lfric2lfric/vn3.0_t214 +meta=lfric-lfric2lfric/vn3.1 [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 f2837c5ad..bd907a551 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/vn3.0_t214 +meta=lfric-lfric_atm/vn3.1 [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 cb64ade9d..8edd951c1 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/vn3.0_t214 +meta=lfric-lfric_atm/vn3.1 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/app/linear_model/file/file_def_ls.xml b/rose-stem/app/linear_model/file/file_def_ls.xml index 63e02702a..a2766a236 100644 --- a/rose-stem/app/linear_model/file/file_def_ls.xml +++ b/rose-stem/app/linear_model/file/file_def_ls.xml @@ -14,6 +14,7 @@ + diff --git a/rose-stem/app/linear_model/file/iodef.xml b/rose-stem/app/linear_model/file/iodef.xml index 0e910ff29..fb000671f 100644 --- a/rose-stem/app/linear_model/file/iodef.xml +++ b/rose-stem/app/linear_model/file/iodef.xml @@ -52,6 +52,11 @@ + + + + + diff --git a/rose-stem/app/linear_model/opt/rose-app-dcmip301.conf b/rose-stem/app/linear_model/opt/rose-app-dcmip301.conf index 01576bf19..8bf78b63c 100644 --- a/rose-stem/app/linear_model/opt/rose-app-dcmip301.conf +++ b/rose-stem/app/linear_model/opt/rose-app-dcmip301.conf @@ -62,6 +62,17 @@ fixed_ls=.false. l_stabilise_bl=.false. pert_option='analytic' +[namelist:linear_physics] +!!blevs_m=15 +!!e_folding_levs_m=10 +!!l_0_m=80.0 +l_boundary_layer=.false. +!!log_layer=2 +!!u_land_m=0.4 +!!u_sea_m=0.4 +!!z_land_m=0.05 +!!z_sea_m=0.0005 + [!!namelist:multigrid] chain_mesh_tags='','','','' diff --git a/rose-stem/app/linear_model/opt/rose-app-nwp_gal9_c12.conf b/rose-stem/app/linear_model/opt/rose-app-nwp_gal9_c12.conf index 4b375741d..864c6a623 100644 --- a/rose-stem/app/linear_model/opt/rose-app-nwp_gal9_c12.conf +++ b/rose-stem/app/linear_model/opt/rose-app-nwp_gal9_c12.conf @@ -3,8 +3,8 @@ mode=auto source=$ROSE_SUITE_DIR/app/linear_model/file/iodef.xml [namelist:files] -ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' -ls_filename='final_ls' +ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' +ls_filename='final_ls_with_land' start_dump_directory='$BIG_DATA_DIR/tangent-linear/Ticket354' start_dump_filename='final_pert' diff --git a/rose-stem/app/linear_model/opt/rose-app-runge-kutta.conf b/rose-stem/app/linear_model/opt/rose-app-runge-kutta.conf index 4f831da45..6daa69cf5 100644 --- a/rose-stem/app/linear_model/opt/rose-app-runge-kutta.conf +++ b/rose-stem/app/linear_model/opt/rose-app-runge-kutta.conf @@ -63,6 +63,17 @@ fixed_ls=.false. l_stabilise_bl=.false. pert_option='analytic' +[namelist:linear_physics] +!!blevs_m=15 +!!e_folding_levs_m=10 +!!l_0_m=80.0 +l_boundary_layer=.false. +!!log_layer=2 +!!u_land_m=0.4 +!!u_sea_m=0.4 +!!z_land_m=0.05 +!!z_sea_m=0.0005 + [namelist:mixed_solver] gcrk=6 mixed_solver_a_tol=1.0e-6 diff --git a/rose-stem/app/linear_model/opt/rose-app-semi-implicit.conf b/rose-stem/app/linear_model/opt/rose-app-semi-implicit.conf index d5417c1d1..14de51a9a 100644 --- a/rose-stem/app/linear_model/opt/rose-app-semi-implicit.conf +++ b/rose-stem/app/linear_model/opt/rose-app-semi-implicit.conf @@ -61,6 +61,17 @@ diagnostic_frequency=20 l_stabilise_bl=.false. pert_option='analytic' +[namelist:linear_physics] +!!blevs_m=15 +!!e_folding_levs_m=10 +!!l_0_m=80.0 +l_boundary_layer=.false. +!!log_layer=2 +!!u_land_m=0.4 +!!u_sea_m=0.4 +!!z_land_m=0.05 +!!z_sea_m=0.0005 + [namelist:mixed_solver] gcrk=6 mixed_solver_a_tol=1.0e-6 diff --git a/rose-stem/app/linear_model/rose-app.conf b/rose-stem/app/linear_model/rose-app.conf index 02b7ac91f..47f8bacb6 100644 --- a/rose-stem/app/linear_model/rose-app.conf +++ b/rose-stem/app/linear_model/rose-app.conf @@ -62,6 +62,7 @@ source=(namelist:aerosol) = (namelist:jules_urban) = (namelist:jules_vegetation) = namelist:linear + = namelist:linear_physics = namelist:logging = (namelist:microphysics) = namelist:mixed_solver @@ -378,7 +379,7 @@ diag_stem_name='diagGungho' !!land_area_ancil_path='' !!lbc_directory='' !!lbc_filename='' -ls_directory='$BIG_DATA_DIR/tangent-linear/Ticket735' +ls_directory='$BIG_DATA_DIR/tangent-linear/PullRequest182' ls_filename='final_2021060200-2021060207' !!no3_ancil_path='' !!o3_ancil_path='' @@ -744,13 +745,24 @@ l_spec_veg_z0=.true. [namelist:linear] fixed_ls=.true. -l_stabilise_bl=.true. +l_stabilise_bl=.false. ls_read_w2h=.false. max_bl_stabilisation=0.75 n_bl_levels_to_stabilise=15 pert_option='file' transport_efficiency=.true. +[namelist:linear_physics] +blevs_m=15 +e_folding_levs_m=10 +l_0_m=80.0 +l_boundary_layer=.true. +log_layer=2 +u_land_m=0.4 +u_sea_m=0.4 +z_land_m=0.05 +z_sea_m=0.0005 + [namelist:logging] log_to_rank_zero_only=.true. run_log_level='info' diff --git a/rose-stem/app/mesh/rose-app.conf b/rose-stem/app/mesh/rose-app.conf index e34b44b7e..7d0e7538e 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/vn3.0 +meta=lfric-mesh_tools/vn3.1 [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 e1d674d67..1112eb2e7 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/vn3.0_t214 +meta=lfric-name_transport/vn3.1 [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 bf6105f54..bc6cfdb63 100644 --- a/rose-stem/app/ngarch/rose-app.conf +++ b/rose-stem/app/ngarch/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-ngarch/vn3.0_t214 +meta=lfric-ngarch/vn3.1 [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 f649c3271..4180237d9 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/vn3.0_t214 +meta=lfric-shallow_water/vn3.1 [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 9a58ffd7b..ea2ecba84 100644 --- a/rose-stem/app/solver/rose-app.conf +++ b/rose-stem/app/solver/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-solver/vn3.0 +meta=lfric-solver/vn3.1 [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 fa61064ae..085ddc4c0 100644 --- a/rose-stem/app/transport/rose-app.conf +++ b/rose-stem/app/transport/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-transport/vn3.0_t214 +meta=lfric-transport/vn3.1 [command] default=$LAUNCH_SCRIPT/launch-exe diff --git a/rose-stem/rose-suite.conf b/rose-stem/rose-suite.conf index c720c8bc7..932fb2d2c 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='3.0' +VN='3.1' 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 b446910a0..727dfdfd9 100644 --- a/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc +++ b/rose-stem/site/common/gungho_model/tasks_gungho_model.cylc @@ -51,7 +51,7 @@ "opt_confs": ["baroclinic"], "resolution": "C48_MG", "DT": 3600, - "threads": 2, + "threads": 1, "mpi_parts": 12, "panel_decomp": "custom", "xproc": 2, 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 fb8062642..a49293d58 100644 --- a/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc +++ b/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc @@ -448,7 +448,7 @@ "opt_confs": ["um_dump","no_diags"], "resolution": "C12", "DT": 1800, - "tsteps": 2, + "tsteps": 6, "crun": 2, "mpi_parts": 6, "kgo_checks": ["checksum"], diff --git a/rose-stem/site/meto/common/suite_config_azspice.cylc b/rose-stem/site/meto/common/suite_config_azspice.cylc index 2a660e66d..07e72b220 100644 --- a/rose-stem/site/meto/common/suite_config_azspice.cylc +++ b/rose-stem/site/meto/common/suite_config_azspice.cylc @@ -9,7 +9,7 @@ 'module purge ; '~ 'module use /home/users/lfricadmin/lmod ; ' %} -{% set azspice_compiler_gnu = 'module load lfric/vn3.0' %} +{% set azspice_compiler_gnu = 'module load lfric/vn3.1' %} {% set azspice_coupled_gnu = 'module load xios/2701-oasis ; '~ 'module load oasis' %} @@ -18,7 +18,7 @@ {% set azspice_scitools = 'module load scitools/production-os47-1' %} -{% set azspice_tech = 'module load lfric/vn3.0' %} +{% set azspice_tech = 'module load lfric/vn3.1' %} [[AZSPICE_BASE]] platform = spice diff --git a/rose-stem/site/meto/common/suite_config_ex1a.cylc b/rose-stem/site/meto/common/suite_config_ex1a.cylc index 6e150bfbc..b1caa833b 100644 --- a/rose-stem/site/meto/common/suite_config_ex1a.cylc +++ b/rose-stem/site/meto/common/suite_config_ex1a.cylc @@ -15,19 +15,19 @@ 'module load PrgEnv-gnu ; '~ 'module load gcc/12.2.0 ; '~ 'module load cray-mpich/8.1.27 ; '~ - 'module load lfric-gnu/12.2.0/3.0+ || true' %} + 'module load lfric-gnu/12.2.0/3.1 || true' %} {% set ex1a_compiler_cce = 'module switch PrgEnv-cray PrgEnv-cray/8.4.0 ; ' ~ 'module load cpe/23.05 ; '~ 'module switch cce cce/15.0.0 ; '~ 'module load cray-mpich/8.1.27 ; '~ - 'module load lfric-cray/15.0.0/3.0+ || true ' %} + 'module load lfric-cray/15.0.0/3.1 || true ' %} -{% set ex1a_coupled_cce = 'module unload xios/2701-h57fm7d || true ; ' ~ +{% set ex1a_coupled_cce = 'module unload xios/2701 || true ; ' ~ '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 GC6-PrgEnv/2026-01-lfric_apps_coupled_port-cpe23.05-mpich8.1.27/5889.lua ; ' 'module load scitools' %} {% set ex1a_coupled_run = '. $BIG_DATA_DIR/ancils/lfric_coupled/ocean/ocean_ancil_GO8p0_CORE_forcing_eORCA025 ; ' ~ diff --git a/rose-stem/site/meto/groups/groups_adjoint_tests.cylc b/rose-stem/site/meto/groups/groups_adjoint_tests.cylc index 7cbcc9a12..402a08529 100644 --- a/rose-stem/site/meto/groups/groups_adjoint_tests.cylc +++ b/rose-stem/site/meto/groups/groups_adjoint_tests.cylc @@ -8,7 +8,6 @@ {# Azspice Groups #} {% do site_groups.update({ "adjoint_tests_azspice_developer": [ - "adjoint_tests_nwp_gal9-C12_MG_azspice_gnu_production-32bit", "adjoint_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit-rsolver64", "adjoint_tests_nwp_gal9-C12_MG_azspice_gnu_full-debug-64bit-rsolver64", "adjoint_tests_nwp_gal9-C12_MG-varying_LS_azspice_gnu_fast-debug-64bit-rsolver64", @@ -31,7 +30,6 @@ "adjoint_tests_ex1a_developer": [ "adjoint_tests_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit-rsolver64", "adjoint_tests_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit-rsolver64", - "adjoint_tests_nwp_gal9-C12_MG_ex1a_gnu_production-32bit", "adjoint_tests_ex1a_canned", ], "adjoint_tests_ex1a": [ @@ -66,6 +64,10 @@ "adjoint_tests_azspice_build", "adjoint_tests_ex1a_build", ], + "adjoint_tests_non-working": [ + "adjoint_tests_nwp_gal9-C12_MG_azspice_gnu_production-32bit", + "adjoint_tests_nwp_gal9-C12_MG_ex1a_gnu_production-32bit" + ] }) %} {# Platform Generic Extends #} diff --git a/rose-stem/site/meto/groups/groups_lfric_atm.cylc b/rose-stem/site/meto/groups/groups_lfric_atm.cylc index 8b9b9cbe9..6f3698750 100644 --- a/rose-stem/site/meto/groups/groups_lfric_atm.cylc +++ b/rose-stem/site/meto/groups/groups_lfric_atm.cylc @@ -27,7 +27,6 @@ "lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit", "lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit", "lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit", - "lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit", "lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit", ], "lfric_atm_nwp_azspice": [ diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit.txt index b95c522cb..5b6183ebe 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40DAA271B80432E6 -Inner product checksum theta = 42418E8249EA97F3 -Inner product checksum u = 43F0A73C14A39448 +Inner product checksum rho = 40DAA271B80432EF +Inner product checksum theta = 42418E8249EA97F2 +Inner product checksum u = 43F0A73C14A39446 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit.txt index ca1a79dc2..52e45dc2f 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2F2B2244799D0 -Inner product checksum theta = 4210411A3418E006 -Inner product checksum u = 4501AC432146D718 +Inner product checksum rho = 40E2F2B224670998 +Inner product checksum theta = 4210411A3415238B +Inner product checksum u = 4501AC43237805FE diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit.txt index fff7d09e8..a85080f2f 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-2panel_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 4102EEF5FAAB93B4 -Inner product checksum theta = 423041DD82556056 -Inner product checksum u = 45017CE3BDE63034 +Inner product checksum rho = 4102EEF5FABDC767 +Inner product checksum theta = 423041DD8252C278 +Inner product checksum u = 45017CE3BF147F0A diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit.txt index 060f81ae0..b0fc51b6e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG-3panel_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 4102EEF5FAAB93B5 -Inner product checksum theta = 423041DD82556059 -Inner product checksum u = 45017CE3BDE63032 +Inner product checksum rho = 4102EEF5FABDC769 +Inner product checksum theta = 423041DD8252C27F +Inner product checksum u = 45017CE3BF147F07 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit.txt index 542074238..28e631548 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-C48_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 4102EEF5FAAB93BA -Inner product checksum theta = 423041DD82556055 -Inner product checksum u = 45017CE3BDE63033 +Inner product checksum rho = 4102EEF5FABDC763 +Inner product checksum theta = 423041DD8252C279 +Inner product checksum u = 45017CE3BF147F13 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit.txt index 1839f3574..849858d0b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt1-C24s_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E31B5B7CB337D5 -Inner product checksum theta = 4210461DE3B34870 -Inner product checksum u = 4500F56A544F1F86 +Inner product checksum rho = 40E31B5BE7BD919A +Inner product checksum theta = 4210461DFF525960 +Inner product checksum u = 4500F52EDECFC16C diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt index 061be97ca..3b2b948c9 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2EB31AEAB0690 -Inner product checksum theta = 42104262EDCF9F78 -Inner product checksum u = 4501DA5CB5DBC24B +Inner product checksum rho = 40E2EB31AEB4C603 +Inner product checksum theta = 42104262EDCEE39B +Inner product checksum u = 4501DA5CB5DBF453 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt index 58c743fce..3ed29f993 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2F34133893AE6 -Inner product checksum theta = 421041C1BC787C3E -Inner product checksum u = 4501D87B2966270E +Inner product checksum rho = 40E2F342C08629AD +Inner product checksum theta = 421041C191162823 +Inner product checksum u = 4501D8905F18DD52 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit.txt index 6ccaf3715..9f18c821b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_baroclinic-pert-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2E61079810D0E -Inner product checksum theta = 4210435EB2DDC0F1 -Inner product checksum u = 4501348CFD77EA40 +Inner product checksum rho = 40E2E610798110FE +Inner product checksum theta = 4210435EB2DDB675 +Inner product checksum u = 4501348CFD7333AA diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_azspice_gnu_fast-debug-64bit.txt index 019d1c4bd..fd3c666a1 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40FE89845A997E06 -Inner product checksum theta = 4210F00A9EEFEDF3 -Inner product checksum u = 42EF4B7C9D6C01D8 +Inner product checksum rho = 40FE89845A99A701 +Inner product checksum theta = 4210F00A9EEFEDA9 +Inner product checksum u = 42EF4B7C9D609EB3 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200-C24_MG_azspice_gnu_fast-debug-64bit.txt index 64287df9b..0b0b0c4bd 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E8E802280ABCF8 -Inner product checksum theta = 4204E59A63CB78B4 -Inner product checksum u = 4391E522B368BE24 +Inner product checksum rho = 40E8E802280ABD04 +Inner product checksum theta = 4204E59A63CB78B5 +Inner product checksum u = 4391E522B345D96A diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200_realorog-C48_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200_realorog-C48_MG_azspice_gnu_fast-debug-64bit.txt index 0872d11c8..2a87de992 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200_realorog-C48_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip200_realorog-C48_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41094B0D90339E0A -Inner product checksum theta = 4224DF77B2266354 -Inner product checksum u = 438852006BE9E2CD +Inner product checksum rho = 41094B0D90339E11 +Inner product checksum theta = 4224DF77B226634E +Inner product checksum u = 438852006BBF0069 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip301-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip301-C24_MG_azspice_gnu_fast-debug-64bit.txt index 81c9f6506..90f688cf0 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip301-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_dcmip301-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D3FF37BCAE739E -Inner product checksum theta = 41EC4ACBE79A8587 -Inner product checksum u = 44176CD1D18E18FC +Inner product checksum rho = 40D3FF37BCAE7397 +Inner product checksum theta = 41EC4ACBE79A8479 +Inner product checksum u = 44176CD1D18E2AF5 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_deep-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_deep-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt index 5b01ca359..2f2341411 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_deep-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_deep-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EEEF2D423E479E -Inner product checksum theta = 42E4D05A8BCEE656 -Inner product checksum u = 475B46A9C47FCB0E +Inner product checksum rho = 40EEEF2D423E47A3 +Inner product checksum theta = 42E4D05A8BCEE1DB +Inner product checksum u = 475B46A9C47FB787 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_earth-like-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_earth-like-C24_MG_azspice_gnu_fast-debug-64bit.txt index b151550e6..41856d806 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_earth-like-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_earth-like-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D56C9EE61BBD77 -Inner product checksum theta = 42198C1850B2D34C -Inner product checksum u = 44E3B95E1E2FF310 +Inner product checksum rho = 40D56C9EE61BC3C6 +Inner product checksum theta = 42198C1850B2D755 +Inner product checksum u = 44E3B95E1E224412 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_held-suarez-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_held-suarez-C24_MG_azspice_gnu_fast-debug-64bit.txt index 703cb92c7..a4e540f2a 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_held-suarez-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_held-suarez-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E34359B7C75475 -Inner product checksum theta = 421168C83D5BA43A -Inner product checksum u = 45082CCFC2F9E7D0 +Inner product checksum rho = 40E34359B8C1F51B +Inner product checksum theta = 421168C83D475CC1 +Inner product checksum u = 45082CCFCF94E9A7 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_lfric-real-domain-C48_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_lfric-real-domain-C48_MG_azspice_gnu_fast-debug-64bit.txt index ef2d843f4..8ef5f2873 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_lfric-real-domain-C48_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_lfric-real-domain-C48_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 4122BD52DCC8006A -Inner product checksum theta = 4240B2570BC700C9 -Inner product checksum u = 44F9DB80026D577A +Inner product checksum rho = 4122BD52DCC8C879 +Inner product checksum theta = 4240B2570BC6116F +Inner product checksum u = 44F9DB80028C7ED8 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt index 3a9e384d6..02c3f9431 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt @@ -1,7 +1,7 @@ -Inner product checksum rho = 41002AB9840956BE -Inner product checksum theta = 4204AB102F77F16E -Inner product checksum u = 42156E231FAF40B2 -Inner product checksum mr1 = 4047451938CF964E +Inner product checksum rho = 41002AB8C8C39016 +Inner product checksum theta = 4204AB102FFEA088 +Inner product checksum u = 42156E16EC9E94D3 +Inner product checksum mr1 = 40474517C0369F04 Inner product checksum mr2 = 0 Inner product checksum mr3 = 0 Inner product checksum mr4 = 0 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt index 072ad5f3b..fd6edf7b7 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit.txt @@ -1,7 +1,7 @@ -Inner product checksum rho = 410029843CDCD5BA -Inner product checksum theta = 4204AB0A9C94010A -Inner product checksum u = 4218421EDC590CAE -Inner product checksum mr1 = 4047C516C5BD62B3 +Inner product checksum rho = 410029831ECEAE7E +Inner product checksum theta = 4204AB0A9B9CB929 +Inner product checksum u = 421842DE12830D66 +Inner product checksum mr1 = 4047C514B4591394 Inner product checksum mr2 = 0 Inner product checksum mr3 = 0 Inner product checksum mr4 = 0 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-C24_MG_azspice_gnu_fast-debug-64bit.txt index f1aede880..2151738ed 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030D58C35909BB -Inner product checksum theta = 42475B42A25CA186 -Inner product checksum u = 456062CEF51C1324 +Inner product checksum rho = 41030D58C3582FBC +Inner product checksum theta = 42475B42A261EF2F +Inner product checksum u = 456062CEF51C79C2 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt index 231eb15fe..cbe07ff1d 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt2-C24_MG_op_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030D6C13692114 -Inner product checksum theta = 42476BF6F9CB0DCA -Inner product checksum u = 4560B547977FC8C4 +Inner product checksum rho = 41030D6C13704D59 +Inner product checksum theta = 42476BF6F9CA5B22 +Inner product checksum u = 4560B5479772DE2C diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt index b1ccd280c..b8bba792e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr-alt3-C24_MG_azspice_gnu_fast-debug-64bit-rtran32.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030F18BC7F8C28 -Inner product checksum theta = 42476C6988C931C5 -Inner product checksum u = 4560A0F426171C4B +Inner product checksum rho = 41030F18BA3F41D1 +Inner product checksum theta = 42476C698981F562 +Inner product checksum u = 4560A0F40D52D12B diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_azspice_gnu_fast-debug-64bit.txt index ee57adc90..6e530e5ee 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E316DD570F220F -Inner product checksum theta = 420BC551F61B38E2 -Inner product checksum u = 44FD3CA2A85DEBBE +Inner product checksum rho = 40E316DD570E3D6C +Inner product checksum theta = 420BC551F61B3002 +Inner product checksum u = 44FD3CA2A860113C diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_azspice_gnu_fast-debug-64bit.txt index e429b368a..daabcd1f5 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E3144534D19E42 -Inner product checksum theta = 420BC6A55E4A9D00 -Inner product checksum u = 44FDCE146C2777B3 +Inner product checksum rho = 40E3144534D1406C +Inner product checksum theta = 420BC6A55E4A92B9 +Inner product checksum u = 44FDCE146C254141 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-BiP200x8-500x500_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-BiP200x8-500x500_azspice_gnu_fast-debug-64bit.txt index fd8894979..ba4c4efc4 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-BiP200x8-500x500_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-BiP200x8-500x500_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E1E481066A10D9 -Inner product checksum theta = 421139232C3CEEAA -Inner product checksum u = 4393A3C2C777BBCA +Inner product checksum rho = 40E1E481066A12D9 +Inner product checksum theta = 421139232C3CED92 +Inner product checksum u = 4393A3C2C776B521 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_azspice_gnu_fast-debug-64bit.txt index fe4259f0d..b81805f52 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40C1E430BB50B566 -Inner product checksum theta = 41F13953C0455904 -Inner product checksum u = 4393B8DB189F7337 +Inner product checksum rho = 40C1E430BB50B00C +Inner product checksum theta = 41F13953C045587E +Inner product checksum u = 4393B8DB189E7930 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_semi-implicit-for-linear-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_semi-implicit-for-linear-C12_azspice_gnu_fast-debug-64bit.txt index c420fe8e4..3678d4bbe 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_semi-implicit-for-linear-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_semi-implicit-for-linear-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ Inner product checksum rho = 40A3EC6A14AC655B Inner product checksum theta = 41BEDEE1880FB475 -Inner product checksum u = 4316BFB1C72C3612 +Inner product checksum u = 4316BFB1C87E4CB4 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_shallow-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_shallow-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt index a4b7337bc..804176505 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_shallow-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_shallow-hot-jupiter-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 400CE3D8ABA81BA3 -Inner product checksum theta = 426EFB4062696458 -Inner product checksum u = 46E90B314646D0A4 +Inner product checksum rho = 400CE3D8AB9EE6EF +Inner product checksum theta = 426EFB40626338A1 +Inner product checksum u = 46E90B31492B9E29 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_azspice_gnu_fast-debug-64bit.txt index ffe89fd94..8f9469a3e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40CBD086E89B5CBC -Inner product checksum theta = 41E3A4D10A00A1F3 -Inner product checksum u = 4400A7C1E614149E +Inner product checksum rho = 40CBD086E89B5CB8 +Inner product checksum theta = 41E3A4D10A00A1E5 +Inner product checksum u = 4400A7C1E6141466 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-BiP256x8-200x200_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-BiP256x8-200x200_azspice_gnu_fast-debug-64bit.txt index a9509981a..f9a3053f9 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-BiP256x8-200x200_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-BiP256x8-200x200_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EA1721E2B197EA -Inner product checksum theta = 41F69B200F92D0F4 -Inner product checksum u = 432D54F6E8799F07 +Inner product checksum rho = 40EA1721E2B1BCD4 +Inner product checksum theta = 41F69B200F927E56 +Inner product checksum u = 432D54F6E82B741E diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_azspice_gnu_fast-debug-64bit.txt index bc0ca5515..b3ad8201a 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40DA171CE530F4BE -Inner product checksum theta = 41E69B0DAB767A1C -Inner product checksum u = 431CEA8125082548 +Inner product checksum rho = 40DA171CE3E1C133 +Inner product checksum theta = 41E69B0DAEB5A2EC +Inner product checksum u = 431CEA80FFBD7029 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_azspice_gnu_fast-debug-64bit.txt index 1b24646b6..e2553efc3 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40FA16E969D70AC8 -Inner product checksum theta = 42069BF1BB714707 -Inner product checksum u = 42FFC30F4E941145 +Inner product checksum rho = 40FA16E969D9ADBC +Inner product checksum theta = 42069BF1BB6B3AAE +Inner product checksum u = 42FFC30F50D36E92 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_azspice_gnu_fast-debug-64bit-rtran32.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_azspice_gnu_fast-debug-64bit-rtran32.txt index 00c69e3b5..741150fb7 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_azspice_gnu_fast-debug-64bit-rtran32.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_azspice_gnu_fast-debug-64bit-rtran32.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EA1719B7A85796 -Inner product checksum theta = 41F69B1F274ACBE8 -Inner product checksum u = 432E6914CA3F2AB7 +Inner product checksum rho = 40EA1719B3F807A5 +Inner product checksum theta = 41F69B1F286ED724 +Inner product checksum u = 432E691969346DF4 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24_MG_azspice_gnu_fast-debug-64bit.txt index fb1ad22d4..6385358bd 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D4230A142E2538 -Inner product checksum theta = 421AE83CAB3FF7AE -Inner product checksum u = 44D53ED041B22503 +Inner product checksum rho = 40D4230A14790BDD +Inner product checksum theta = 421AE83CAB1DBD5A +Inner product checksum u = 44D53ED2C725DCD9 diff --git a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_azspice_gnu_fast-debug-64bit.txt index c902f2382..35e317f21 100644 --- a/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/azspice/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D3B0E59A69EFC5 -Inner product checksum theta = 421AFAEA2C5D980F -Inner product checksum u = 44D44E9C9400007A +Inner product checksum rho = 40D3B0E4F2F3F788 +Inner product checksum theta = 421AFAEA72C368FC +Inner product checksum u = 44D4523A63DCEC15 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt index 90ea498c0..8e80d1ea5 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_agnesi_hyd_cart-BiP120x8-2000x2000_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40DAA271B80432E7 +Inner product checksum rho = 40DAA271B80432EF Inner product checksum theta = 42418E8249EA97F2 -Inner product checksum u = 43F0A73C14A39448 +Inner product checksum u = 43F0A73C14A39445 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 1b949d925..8c67e23f6 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2F2B22483EA3D -Inner product checksum theta = 4210411A3410C3C7 -Inner product checksum u = 4501AC432284CD82 +Inner product checksum rho = 40E2F2B2246A07FD +Inner product checksum theta = 4210411A34141D34 +Inner product checksum u = 4501AC432220ABA1 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C48_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C48_MG_ex1a_gnu_fast-debug-64bit.txt index df436b1fe..8310a51cf 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C48_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-C48_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 4102EEF5FAB7BD35 -Inner product checksum theta = 423041DD82538AE9 -Inner product checksum u = 45017CE3BDC64744 +Inner product checksum rho = 4102EEF5FAB1F22F +Inner product checksum theta = 423041DD82543A06 +Inner product checksum u = 45017CE3BDB23B34 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt index 09869fdd8..9926f5622 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt1-C24s_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E31B4D10BF0DA0 -Inner product checksum theta = 4210461F9BB0AAAE -Inner product checksum u = 4500F4E3AE6CD8D8 +Inner product checksum rho = 40E31B57FB56C28B +Inner product checksum theta = 4210461EBD1C09DD +Inner product checksum u = 4500F50E9B2378D6 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt index 6ffb81194..2cadd1d66 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2EB31AEB7AC54 -Inner product checksum theta = 42104262EDCE8094 -Inner product checksum u = 4501DA5CB6E76460 +Inner product checksum rho = 40E2EB31AE95DD26 +Inner product checksum theta = 42104262EDD1A3D6 +Inner product checksum u = 4501DA5CB56AC4C4 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt index dcdf764c4..70e360c33 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-alt3-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2F3443865F0C8 -Inner product checksum theta = 421041C0A40F716F -Inner product checksum u = 4501D87BC37CB1BA +Inner product checksum rho = 40E2F344387CD754 +Inner product checksum theta = 421041C0A40ECB7E +Inner product checksum u = 4501D87BC56E88BD diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 4ddcb7e18..52c76bceb 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_baroclinic-pert-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E2E61079810B7E -Inner product checksum theta = 4210435EB2DDAEFC -Inner product checksum u = 4501348CFD711AFA +Inner product checksum rho = 40E2E6107980FD66 +Inner product checksum theta = 4210435EB2DDA492 +Inner product checksum u = 4501348CFD745E06 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_ex1a_gnu_fast-debug-64bit.txt index a33fd4a1b..cf12c4bbc 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_bryan_fritsch-dry-BiP200x10-100x100_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40FE89845A997E06 -Inner product checksum theta = 4210F00A9EEFEDF3 -Inner product checksum u = 42EF4B7C9D6C01D9 +Inner product checksum rho = 40FE89845A99A702 +Inner product checksum theta = 4210F00A9EEFEDA9 +Inner product checksum u = 42EF4B7C9D609EB4 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt index a449fc5d3..4a3c842e3 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E8E802280ABCFA -Inner product checksum theta = 4204E59A63CB78B2 -Inner product checksum u = 4391E522B31489D4 +Inner product checksum rho = 40E8E802280ABCFD +Inner product checksum theta = 4204E59A63CB78BA +Inner product checksum u = 4391E522B3045453 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200_realorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200_realorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt index a4fa9f025..1bc5bbada 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200_realorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip200_realorog-C48_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41094B0D90339E14 -Inner product checksum theta = 4224DF77B226634F -Inner product checksum u = 438852006BFEBBA6 +Inner product checksum rho = 41094B0D90339E0A +Inner product checksum theta = 4224DF77B226635A +Inner product checksum u = 438852006C521A1B diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 317fe4b7b..ca4b35a8d 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_dcmip301-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D3FF37BCAE7576 -Inner product checksum theta = 41EC4ACBE79A8562 -Inner product checksum u = 44176CD1D18E1C00 +Inner product checksum rho = 40D3FF37BCAE768E +Inner product checksum theta = 41EC4ACBE79A813C +Inner product checksum u = 44176CD1D18E1F8D diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_deep-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_deep-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 9a85c4f4e..5eb77db6e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_deep-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_deep-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EEEF2D423E47AC -Inner product checksum theta = 42E4D05A8BCEE98C -Inner product checksum u = 475B46A9C47FDB67 +Inner product checksum rho = 40EEEF2D423E47A6 +Inner product checksum theta = 42E4D05A8BCEDE80 +Inner product checksum u = 475B46A9C47FDD23 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_earth-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_earth-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 4ef335a94..23e2af56b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_earth-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_earth-like-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D56C9EE61BC02A -Inner product checksum theta = 42198C1850B2D284 -Inner product checksum u = 44E3B95E1E476DC8 +Inner product checksum rho = 40D56C9EE61BC316 +Inner product checksum theta = 42198C1850B2D534 +Inner product checksum u = 44E3B95E1E3659CE diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_held-suarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_held-suarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 75bfdf0cf..4c22bf942 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_held-suarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_held-suarez-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E34359B80C5804 -Inner product checksum theta = 421168C83D4A79F3 -Inner product checksum u = 45082CCFCECDD575 +Inner product checksum rho = 40E34359BE60DD69 +Inner product checksum theta = 421168C83C59A6DF +Inner product checksum u = 45082CD01E2731A4 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_lfric-real-domain-C48_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_lfric-real-domain-C48_MG_ex1a_gnu_fast-debug-64bit.txt index 9a03afb2d..56de6557b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_lfric-real-domain-C48_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_lfric-real-domain-C48_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 4122BD52DCC6D87A -Inner product checksum theta = 4240B2570BC5F2DA -Inner product checksum u = 44F9DB8002644CBC +Inner product checksum rho = 4122BD52DCC9E6EB +Inner product checksum theta = 4240B2570BC5E580 +Inner product checksum u = 44F9DB8002ADEC3D diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt index 3a9e384d6..02c3f9431 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-lam-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt @@ -1,7 +1,7 @@ -Inner product checksum rho = 41002AB9840956BE -Inner product checksum theta = 4204AB102F77F16E -Inner product checksum u = 42156E231FAF40B2 -Inner product checksum mr1 = 4047451938CF964E +Inner product checksum rho = 41002AB8C8C39016 +Inner product checksum theta = 4204AB102FFEA088 +Inner product checksum u = 42156E16EC9E94D3 +Inner product checksum mr1 = 40474517C0369F04 Inner product checksum mr2 = 0 Inner product checksum mr3 = 0 Inner product checksum mr4 = 0 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt index 072ad5f3b..fd6edf7b7 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_robert-moist-smag-BiP100x8-10x10_ex1a_gnu_fast-debug-64bit.txt @@ -1,7 +1,7 @@ -Inner product checksum rho = 410029843CDCD5BA -Inner product checksum theta = 4204AB0A9C94010A -Inner product checksum u = 4218421EDC590CAE -Inner product checksum mr1 = 4047C516C5BD62B3 +Inner product checksum rho = 410029831ECEAE7E +Inner product checksum theta = 4204AB0A9B9CB929 +Inner product checksum u = 421842DE12830D66 +Inner product checksum mr1 = 4047C514B4591394 Inner product checksum mr2 = 0 Inner product checksum mr3 = 0 Inner product checksum mr4 = 0 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 7e1dfb2bf..fa464e671 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030D58C358841C -Inner product checksum theta = 42475B42A25BD24C -Inner product checksum u = 456062CEF51ADA01 +Inner product checksum rho = 41030D58C3590812 +Inner product checksum theta = 42475B42A25E97B8 +Inner product checksum u = 456062CEF51D4871 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt index 087fd2fad..75ce9ee29 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt2-C24_MG_op_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030D6C136C4726 -Inner product checksum theta = 42476BF6F9C9E065 -Inner product checksum u = 4560B547977B120F +Inner product checksum rho = 41030D6C1370FF70 +Inner product checksum theta = 42476BF6F9CAD9BF +Inner product checksum u = 4560B54797698F24 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt3-C24_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt3-C24_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt index e42f32057..d3d96a110 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt3-C24_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr-alt3-C24_MG_ex1a_gnu_fast-debug-64bit-rtran32.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 41030F18B9FB67A0 -Inner product checksum theta = 42476C698DF698DD -Inner product checksum u = 4560A0F3DA7365AC +Inner product checksum rho = 41030F18BA556EED +Inner product checksum theta = 42476C6985EDD5A2 +Inner product checksum u = 4560A0F4FB952ACD diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt index 2d5e3b173..23aaf00d6 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E316DD570F67E7 -Inner product checksum theta = 420BC551F61B2ADE -Inner product checksum u = 44FD3CA2A85A5D90 +Inner product checksum rho = 40E316DD570E5057 +Inner product checksum theta = 420BC551F61B391B +Inner product checksum u = 44FD3CA2A85EC12A diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_ex1a_gnu_fast-debug-64bit.txt index 30022c661..75ecd5a6e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_sbr_lam-n96_MG_lam_rotate_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E3144534D22EC1 -Inner product checksum theta = 420BC6A55E4A8238 -Inner product checksum u = 44FDCE146C25FF50 +Inner product checksum rho = 40E3144534D209FF +Inner product checksum theta = 420BC6A55E4A954D +Inner product checksum u = 44FDCE146C249D82 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-BiP200x8-500x500_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-BiP200x8-500x500_ex1a_gnu_fast-debug-64bit.txt index fd8894979..ba4c4efc4 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-BiP200x8-500x500_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-BiP200x8-500x500_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40E1E481066A10D9 -Inner product checksum theta = 421139232C3CEEAA -Inner product checksum u = 4393A3C2C777BBCA +Inner product checksum rho = 40E1E481066A12D9 +Inner product checksum theta = 421139232C3CED92 +Inner product checksum u = 4393A3C2C776B521 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt index 47bb68917..adf57f0b7 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_schar_cart-alt2-BiP100x4-1000x1000_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40C1E430BB50AC1A -Inner product checksum theta = 41F13953C0455C57 -Inner product checksum u = 4393B8DB189D1463 +Inner product checksum rho = 40C1E430BB50B1BB +Inner product checksum theta = 41F13953C0455941 +Inner product checksum u = 4393B8DB189EAE30 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_semi-implicit-for-linear-C12_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_semi-implicit-for-linear-C12_ex1a_gnu_fast-debug-64bit.txt index 9ca596629..92e047db7 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_semi-implicit-for-linear-C12_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_semi-implicit-for-linear-C12_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ Inner product checksum rho = 40A3EC6A14AC655D Inner product checksum theta = 41BEDEE1880FB475 -Inner product checksum u = 4316BFB1C7362BEB +Inner product checksum u = 4316BFB1C87E4218 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_shallow-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_shallow-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 415129215..1251a6b1d 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_shallow-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_shallow-hot-jupiter-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 400CE3D8ABB2DD00 -Inner product checksum theta = 426EFB40626F1444 -Inner product checksum u = 46E90B314334D653 +Inner product checksum rho = 400CE3D8ABA24B4C +Inner product checksum theta = 426EFB406264FDD6 +Inner product checksum u = 46E90B3147CFEAB5 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt index ffe89fd94..8f9469a3e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_skamarock_klemp_gw_p0-BiP300x8-1000x2000_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40CBD086E89B5CBC -Inner product checksum theta = 41E3A4D10A00A1F3 -Inner product checksum u = 4400A7C1E614149E +Inner product checksum rho = 40CBD086E89B5CB8 +Inner product checksum theta = 41E3A4D10A00A1E5 +Inner product checksum u = 4400A7C1E6141466 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt index dd7d16fd9..4c68af9dc 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EA1721E2B197EB -Inner product checksum theta = 41F69B200F92D0F4 -Inner product checksum u = 432D54F6E8799F07 +Inner product checksum rho = 40EA1721E2B1BCD4 +Inner product checksum theta = 41F69B200F927E57 +Inner product checksum u = 432D54F6E82B741E diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_ex1a_gnu_fast-debug-64bit.txt index fa2891bb7..7c43065c3 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt1-BiP256x4-200x200_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40DA171CE5311E97 -Inner product checksum theta = 41E69B0DAB753A8E -Inner product checksum u = 431CEA812598E8B0 +Inner product checksum rho = 40DA171CE319AA16 +Inner product checksum theta = 41E69B0DB0A24402 +Inner product checksum u = 431CEA80F2E391C8 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_ex1a_gnu_fast-debug-64bit.txt index 22f2c4445..64502ae9f 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt2-BiP256x16-200x50_op_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40FA16E969D797DC -Inner product checksum theta = 42069BF1BB703F6A -Inner product checksum u = 42FFC30F4ED2B428 +Inner product checksum rho = 40FA16E969D78B0B +Inner product checksum theta = 42069BF1BB70B7A9 +Inner product checksum u = 42FFC30F4F0FCDA2 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt index 075d391fc..bc0f86a1b 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_straka_200m-alt3-BiP256x8-200x200_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40EA171A18309116 -Inner product checksum theta = 41F69B1D66F906CB -Inner product checksum u = 432E68AADCDE17B3 +Inner product checksum rho = 40EA171A18307190 +Inner product checksum theta = 41F69B1D66F943A0 +Inner product checksum u = 432E68AADC8D5EF8 diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt index 4eabe5852..cfaab8a14 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D4230A151FF934 -Inner product checksum theta = 421AE83CAB37AF03 -Inner product checksum u = 44D53ED8FE8EFCB8 +Inner product checksum rho = 40D4230A14ACFCE9 +Inner product checksum theta = 421AE83CAB3C5322 +Inner product checksum u = 44D53ED6B3D6E0DA diff --git a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt index a79f89bae..45924fc3e 100644 --- a/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/gungho_model/ex1a/checksum_gungho_model_tidally-locked-earth-C24s_rot_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 40D3B0E62782CAE2 -Inner product checksum theta = 421AFAE9CA9B746E -Inner product checksum u = 44D446E66D73CADC +Inner product checksum rho = 40D3B0E5979CA91C +Inner product checksum theta = 421AFAEA87B084F6 +Inner product checksum u = 44D456945F0A4E4A diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit.txt index 9fef2e092..76a23cf15 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_fast-debug-64bit.txt @@ -1 +1 @@ -Inner product checksum theta = 41F6D123019100F3 +Inner product checksum theta = 41F6D12301909313 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_full-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_full-debug-64bit.txt index 9fef2e092..76a23cf15 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_full-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_azspice_gnu_full-debug-64bit.txt @@ -1 +1 @@ -Inner product checksum theta = 41F6D123019100F3 +Inner product checksum theta = 41F6D12301909313 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt index ca1c9b696..6dbf85b1b 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/azspice/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA954E9A449FB06 -Inner product checksum theta = 41621E6CC91EFABE -Inner product checksum u = 456AA006A7217B83 -Inner product checksum mr1 = 3F3BA4B79A953539 -Inner product checksum mr2 = 3EEB35B4901EB642 -Inner product checksum mr3 = 3EDFF31E6E1668C7 -Inner product checksum mr4 = 3EED434856C537AA +Inner product checksum rho = 3FA4FD2C7690DC24 +Inner product checksum theta = 415FF4F8712C6491 +Inner product checksum u = 45673B7E0559C62C +Inner product checksum mr1 = 3F35B15D7C0E86A8 +Inner product checksum mr2 = 3EEAD6BF4FDA7F92 +Inner product checksum mr3 = 3EDFF2E76CAF5FF5 +Inner product checksum mr4 = 3EED395DF2372B29 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit.txt index d3457f776..223d31dbd 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_forecast_gh-si-for-linear-C12_ex1a_cce_fast-debug-64bit.txt @@ -1 +1 @@ -Inner product checksum theta = 41F6D123018FAA92 +Inner product checksum theta = 41F6D123019048BD diff --git a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt index e6a501ffa..3134a07c3 100644 --- a/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/jedi_lfric_tests/ex1a/checksum_jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA954E77C9702D2 -Inner product checksum theta = 41621E6CB5A310B8 -Inner product checksum u = 456AA005FD15DCC3 -Inner product checksum mr1 = 3F3BA4A999D2C4BF -Inner product checksum mr2 = 3EEB35B47E5E8E90 -Inner product checksum mr3 = 3EDFF31E706C8D74 -Inner product checksum mr4 = 3EED434835688943 +Inner product checksum rho = 3FA4FD2A13297D96 +Inner product checksum theta = 415FF4F7791418F7 +Inner product checksum u = 45673B7DB19E7072 +Inner product checksum mr1 = 3F35B160CCE25E2C +Inner product checksum mr2 = 3EEAD6BF59DB2878 +Inner product checksum mr3 = 3EDFF2E76569C104 +Inner product checksum mr4 = 3EED395DCB2F649B Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_aquaplanet-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_aquaplanet-C12_azspice_gnu_fast-debug-32bit.txt index 2ecefd4db..baad1f3c6 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_aquaplanet-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_aquaplanet-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 468AD8FE -Inner product checksum theta = 4FD68989 -Inner product checksum u = 6A4E3C3E -Inner product checksum mr1 = 3F07F951 -Inner product checksum mr2 = 369F34F0 -Inner product checksum mr3 = 341E003E -Inner product checksum mr4 = 36948DFB +Inner product checksum rho = 468AD911 +Inner product checksum theta = 4FD68987 +Inner product checksum u = 6A4E39D0 +Inner product checksum mr1 = 3F080026 +Inner product checksum mr2 = 369843BE +Inner product checksum mr3 = 3416CDCB +Inner product checksum mr4 = 36905047 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_camembert_case3_gj1214b-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_camembert_case3_gj1214b-C12_azspice_gnu_fast-debug-32bit.txt index c56ebe566..a8808603d 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_camembert_case3_gj1214b-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_camembert_case3_gj1214b-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 44D95713 -Inner product checksum theta = 5504FC44 -Inner product checksum u = 74276DFA +Inner product checksum rho = 44D95710 +Inner product checksum theta = 5504FC40 +Inner product checksum u = 74276E1C diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9-C12_azspice_gnu_fast-debug-32bit.txt index 66b711298..4b640fd26 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D65FE3 -Inner product checksum theta = 518E9585 -Inner product checksum u = 6AF46ADC -Inner product checksum mr1 = 3FD21F1A -Inner product checksum mr2 = 372CC58C -Inner product checksum mr3 = 352ADBAA -Inner product checksum mr4 = 36BE98CC +Inner product checksum rho = 46D6671E +Inner product checksum theta = 518E9CC1 +Inner product checksum u = 6AF4B3E5 +Inner product checksum mr1 = 3FD1DD2C +Inner product checksum mr2 = 3744637E +Inner product checksum mr3 = 3533FB34 +Inner product checksum mr4 = 36C1322A Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9_chem-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9_chem-C12_azspice_gnu_fast-debug-32bit.txt index 8a6c3c069..0920e465c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9_chem-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_clim_gal9_chem-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D66414 -Inner product checksum theta = 518E973F -Inner product checksum u = 6AF484AE -Inner product checksum mr1 = 3FD1FF21 -Inner product checksum mr2 = 373AFADB -Inner product checksum mr3 = 35284720 -Inner product checksum mr4 = 36BE75F8 +Inner product checksum rho = 46D66653 +Inner product checksum theta = 518E9990 +Inner product checksum u = 6AF43E1A +Inner product checksum mr1 = 3FD1D04B +Inner product checksum mr2 = 3745B69A +Inner product checksum mr3 = 353019A0 +Inner product checksum mr4 = 36BDF494 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_hd209458b-C24_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_hd209458b-C24_azspice_gnu_fast-debug-32bit.txt index 0a6b22e91..53e80d265 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_hd209458b-C24_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_hd209458b-C24_azspice_gnu_fast-debug-32bit.txt @@ -1,3 +1,3 @@ Inner product checksum rho = 4798D8B6 -Inner product checksum theta = 5840648A -Inner product checksum u = 79BA7C16 +Inner product checksum theta = 5840648C +Inner product checksum u = 79BA7D9D diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit.txt index cb2bceb23..77784af5b 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_casim-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8572E -Inner product checksum theta = 518BD518 -Inner product checksum u = 6A8BA3FC -Inner product checksum mr1 = 3FCCE2EE -Inner product checksum mr2 = 382DF4D0 -Inner product checksum mr3 = 354E9000 -Inner product checksum mr4 = 36BDDF05 -Inner product checksum mr5 = 2DB85767 -Inner product checksum mr6 = 352C485B +Inner product checksum rho = 46D8578E +Inner product checksum theta = 518BD702 +Inner product checksum u = 6A8A9FF5 +Inner product checksum mr1 = 3FCD79BE +Inner product checksum mr2 = 38309A00 +Inner product checksum mr3 = 353B5ACC +Inner product checksum mr4 = 36D670E9 +Inner product checksum mr5 = 2E296A8A +Inner product checksum mr6 = 3534119C diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit.txt index 947ec0a88..fba375852 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_coma9-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D84362 -Inner product checksum theta = 518BD871 -Inner product checksum u = 6A87D936 -Inner product checksum mr1 = 3FCF614E -Inner product checksum mr2 = 37E7E4A4 -Inner product checksum mr3 = 378F2CA2 -Inner product checksum mr4 = 379ADB57 -Inner product checksum mr5 = 36B1AA8D +Inner product checksum rho = 46D8451F +Inner product checksum theta = 518BD5CF +Inner product checksum u = 6A871C80 +Inner product checksum mr1 = 3FCF8CE1 +Inner product checksum mr2 = 37E92CD1 +Inner product checksum mr3 = 378E0B27 +Inner product checksum mr4 = 378C60AF +Inner product checksum mr5 = 369846E2 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit.txt deleted file mode 100644 index 453fdfa4d..000000000 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_comorph_dev-C12_azspice_gnu_fast-debug-32bit.txt +++ /dev/null @@ -1,9 +0,0 @@ -Inner product checksum rho = 46D83306 -Inner product checksum theta = 518BE632 -Inner product checksum u = 6A85B1FE -Inner product checksum mr1 = 3FD1398E -Inner product checksum mr2 = 37FB1AAC -Inner product checksum mr3 = 377D2C78 -Inner product checksum mr4 = 37C59BA4 -Inner product checksum mr5 = 369FB91A -Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-32bit.txt index 084e05438..acf51eab2 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D83BC9 -Inner product checksum theta = 518BD65A -Inner product checksum u = 6A88BE68 -Inner product checksum mr1 = 3FD01994 -Inner product checksum mr2 = 37D49395 -Inner product checksum mr3 = 35B4D40E -Inner product checksum mr4 = 372B4906 +Inner product checksum rho = 46D83C03 +Inner product checksum theta = 518BD66C +Inner product checksum u = 6A893E10 +Inner product checksum mr1 = 3FD01810 +Inner product checksum mr2 = 37C7F30E +Inner product checksum mr3 = 35A35CEC +Inner product checksum mr4 = 370161BA Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt index 1a521e95d..b6e13d25a 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 40DB077A32A5D39E -Inner product checksum theta = 42317AEAFA2F06CC -Inner product checksum u = 45512607B88A6C5D -Inner product checksum mr1 = 3FF9FF43CF5DCDF7 -Inner product checksum mr2 = 3EF8E5EF45D09B6F -Inner product checksum mr3 = 3EB545D58429736C -Inner product checksum mr4 = 3EE62D27994CF443 +Inner product checksum rho = 40DB07AB9AFC01EF +Inner product checksum theta = 42317ADC8422F866 +Inner product checksum u = 45511E317DB149A5 +Inner product checksum mr1 = 3FF9FFC388F4C713 +Inner product checksum mr2 = 3EFB93018FC96529 +Inner product checksum mr3 = 3EB5CEE201A20BA4 +Inner product checksum mr4 = 3EE600C8EA2D0F0B Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C48_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C48_MG_azspice_gnu_fast-debug-32bit.txt index 3801d2bf3..10d9b44ca 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C48_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-C48_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FCF6 -Inner product checksum theta = 5392A704 -Inner product checksum u = 6A97BC83 -Inner product checksum mr1 = 41CD07C8 -Inner product checksum mr2 = 39CF1B86 -Inner product checksum mr3 = 37B995EA -Inner product checksum mr4 = 395FB7D8 +Inner product checksum rho = 48D7FCF3 +Inner product checksum theta = 5392A6CA +Inner product checksum u = 6A97B62D +Inner product checksum mr1 = 41CD09D2 +Inner product checksum mr2 = 39C5EB06 +Inner product checksum mr3 = 37B3A951 +Inner product checksum mr4 = 395FCEA4 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit.txt index 99e7b6019..64760e2f3 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9-pert-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D81303 -Inner product checksum theta = 51944591 -Inner product checksum u = 6B463744 -Inner product checksum mr1 = 3FC88C91 -Inner product checksum mr2 = 37A91022 -Inner product checksum mr3 = 35A18B22 -Inner product checksum mr4 = 37892EB4 +Inner product checksum rho = 46D812FE +Inner product checksum theta = 51944595 +Inner product checksum u = 6B463661 +Inner product checksum mr1 = 3FC88DAE +Inner product checksum mr2 = 37ABA450 +Inner product checksum mr3 = 35A4CCD4 +Inner product checksum mr4 = 37897CFA Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_azspice_gnu_fast-debug-32bit.txt index 9ea9b6cd4..fe9f49f4c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FD92 -Inner product checksum theta = 5392A6C0 -Inner product checksum u = 6A97B8BA -Inner product checksum mr1 = 41CD0440 -Inner product checksum mr2 = 39CFA679 -Inner product checksum mr3 = 37B13B20 -Inner product checksum mr4 = 3961A46A +Inner product checksum rho = 48D7FDA1 +Inner product checksum theta = 5392A6E1 +Inner product checksum u = 6A97B426 +Inner product checksum mr1 = 41CD1068 +Inner product checksum mr2 = 39CDCF8E +Inner product checksum mr3 = 37B22A3E +Inner product checksum mr4 = 3960D144 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_da-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_da-C12_azspice_gnu_fast-debug-32bit.txt index f33642940..ff1dc8e42 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_da-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_da-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8145E -Inner product checksum theta = 518BD6F2 -Inner product checksum u = 6A87153E -Inner product checksum mr1 = 3FD3EF70 -Inner product checksum mr2 = 37E0666A -Inner product checksum mr3 = 359DFD4E -Inner product checksum mr4 = 36D0FB2B +Inner product checksum rho = 46D812FA +Inner product checksum theta = 518BD71C +Inner product checksum u = 6A87CBC7 +Inner product checksum mr1 = 3FD3E175 +Inner product checksum mr2 = 37DDA610 +Inner product checksum mr3 = 35AD9804 +Inner product checksum mr4 = 36E4050E Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C12_azspice_gnu_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C12_azspice_gnu_full-debug-32bit.txt index 6ca00a99c..d4dc86bb5 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C12_azspice_gnu_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C12_azspice_gnu_full-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8045E -Inner product checksum theta = 519522B0 -Inner product checksum u = 6AE6775F -Inner product checksum mr1 = 3FC86242 -Inner product checksum mr2 = 37CE62AF -Inner product checksum mr3 = 351E2FB8 -Inner product checksum mr4 = 36F05BC6 +Inner product checksum rho = 46D8045A +Inner product checksum theta = 519522AF +Inner product checksum u = 6AE677C8 +Inner product checksum mr1 = 3FC86195 +Inner product checksum mr2 = 37CC5EDC +Inner product checksum mr3 = 35200AA4 +Inner product checksum mr4 = 36F06583 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C48_MG_azspice_gnu_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C48_MG_azspice_gnu_full-debug-32bit.txt index 4abb11228..95689700c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C48_MG_azspice_gnu_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_debug-C48_MG_azspice_gnu_full-debug-32bit.txt @@ -1,9 +1,9 @@ Inner product checksum rho = 48D81494 Inner product checksum theta = 53952668 -Inner product checksum u = 6AA4D6D6 -Inner product checksum mr1 = 41C831A6 -Inner product checksum mr2 = 399A1F3A -Inner product checksum mr3 = 3778700E -Inner product checksum mr4 = 39303C95 +Inner product checksum u = 6AA4D6DC +Inner product checksum mr1 = 41C8318B +Inner product checksum mr2 = 3999AAE7 +Inner product checksum mr3 = 3778FB0C +Inner product checksum mr4 = 39305110 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda-C12_azspice_gnu_fast-debug-32bit.txt index 4ab701a5c..0d92b82da 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D81891 -Inner product checksum theta = 518BB0F9 -Inner product checksum u = 6A8CE1A8 -Inner product checksum mr1 = 3FD0F263 -Inner product checksum mr2 = 37DCAC0A -Inner product checksum mr3 = 35A94992 -Inner product checksum mr4 = 36FD186E +Inner product checksum rho = 46D8193D +Inner product checksum theta = 518BAFDA +Inner product checksum u = 6A8CB83F +Inner product checksum mr1 = 3FD1216C +Inner product checksum mr2 = 37EA1582 +Inner product checksum mr3 = 35979016 +Inner product checksum mr4 = 36F53919 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda_jada-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda_jada-C12_azspice_gnu_fast-debug-32bit.txt index a2989b076..c009453d0 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda_jada-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_eda_jada-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D81321 -Inner product checksum theta = 518BD42A -Inner product checksum u = 6A87EB05 -Inner product checksum mr1 = 3FD3AD5F -Inner product checksum mr2 = 37DC3ACC -Inner product checksum mr3 = 35A64BE8 -Inner product checksum mr4 = 36EF9D2C +Inner product checksum rho = 46D81432 +Inner product checksum theta = 518BD0DB +Inner product checksum u = 6A88AA11 +Inner product checksum mr1 = 3FD40165 +Inner product checksum mr2 = 37D52121 +Inner product checksum mr3 = 35A5B57C +Inner product checksum mr4 = 36D99E7A Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit.txt index 89ce18509..2a9756a9d 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_mol-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8607E -Inner product checksum theta = 5193B0DC -Inner product checksum u = 6A85E59E -Inner product checksum mr1 = 3FD09522 -Inner product checksum mr2 = 37B4AF7B -Inner product checksum mr3 = 35632712 -Inner product checksum mr4 = 36F43B14 +Inner product checksum rho = 46D85CAB +Inner product checksum theta = 5193AFF8 +Inner product checksum u = 6A85DAD0 +Inner product checksum mr1 = 3FD03DEE +Inner product checksum mr2 = 37ABF442 +Inner product checksum mr3 = 3538567A +Inner product checksum mr4 = 36E34FE8 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit.txt index 3d421895e..b71654b5e 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7FBEB -Inner product checksum theta = 51955780 -Inner product checksum u = 6B246B95 -Inner product checksum mr1 = 3FC852B6 -Inner product checksum mr2 = 38206E5D -Inner product checksum mr3 = 356244E0 -Inner product checksum mr4 = 36F619B8 +Inner product checksum rho = 46D80C8A +Inner product checksum theta = 5194ED92 +Inner product checksum u = 6B085AD5 +Inner product checksum mr1 = 3FC88023 +Inner product checksum mr2 = 37C1A81E +Inner product checksum mr3 = 356CD412 +Inner product checksum mr4 = 372B87CE Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit.txt index c047310ba..406a369aa 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 483997C4 +Inner product checksum rho = 483997C9 Inner product checksum theta = 513548FE -Inner product checksum u = 612F5B30 -Inner product checksum mr1 = 4090F684 -Inner product checksum mr2 = 35968A4C -Inner product checksum mr3 = 2FA58445 -Inner product checksum mr4 = 33F4FD5B -Inner product checksum mr5 = BE7D076 +Inner product checksum u = 612F5B38 +Inner product checksum mr1 = 4090F631 +Inner product checksum mr2 = 3591CCEA +Inner product checksum mr3 = 2FA57746 +Inner product checksum mr4 = 33F4FD79 +Inner product checksum mr5 = BE7D083 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit.txt index b32f78537..5ff558d35 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 483999C0 -Inner product checksum theta = 51354859 -Inner product checksum u = 612F6177 -Inner product checksum mr1 = 40916616 -Inner product checksum mr2 = 3665CE60 -Inner product checksum mr3 = 2FABFDC7 -Inner product checksum mr4 = 33F4FD84 -Inner product checksum mr5 = BF21937 +Inner product checksum rho = 483999C8 +Inner product checksum theta = 5135485A +Inner product checksum u = 612F6174 +Inner product checksum mr1 = 40916665 +Inner product checksum mr2 = 364416DC +Inner product checksum mr3 = 2FAC1A90 +Inner product checksum mr4 = 33F4FD6C +Inner product checksum mr5 = BF21909 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit.txt index b4850d1f4..2d266dd37 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ Inner product checksum rho = 48398C6E -Inner product checksum theta = 513542F9 -Inner product checksum u = 612EE1D1 -Inner product checksum mr1 = 40910342 -Inner product checksum mr2 = 3583FD8D -Inner product checksum mr3 = 3000F7F9 -Inner product checksum mr4 = 3404AC4B -Inner product checksum mr5 = C145772 +Inner product checksum theta = 513542FA +Inner product checksum u = 612EE1CA +Inner product checksum mr1 = 409102F1 +Inner product checksum mr2 = 3592AEA4 +Inner product checksum mr3 = 30010913 +Inner product checksum mr4 = 3404ABD5 +Inner product checksum mr5 = C145771 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_azspice_gnu_fast-debug-32bit.txt index d9383088e..da0cb3435 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 4830B5F4 -Inner product checksum theta = 513FD8D7 -Inner product checksum u = 5F74AE58 -Inner product checksum mr1 = 4155C227 -Inner product checksum mr2 = 3A4220DF -Inner product checksum mr3 = 30A9A908 +Inner product checksum rho = 4830B5EB +Inner product checksum theta = 513FD8CE +Inner product checksum u = 5F74A78A +Inner product checksum mr1 = 4155BE3F +Inner product checksum mr2 = 3A3E0C78 +Inner product checksum mr3 = 30A03718 Inner product checksum mr4 = 0 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_thai_ben1-C48_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_thai_ben1-C48_MG_azspice_gnu_fast-debug-32bit.txt index a51c4cac2..b97fba172 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_thai_ben1-C48_MG_azspice_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_thai_ben1-C48_MG_azspice_gnu_fast-debug-32bit.txt @@ -1,3 +1,3 @@ Inner product checksum rho = 486B4A32 -Inner product checksum theta = 51CABF2C -Inner product checksum u = 63C9D878 +Inner product checksum theta = 51CABF2D +Inner product checksum u = 63C9DB14 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_aquaplanet-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_aquaplanet-C12_ex1a_cce_fast-debug-32bit.txt index 5afac9a6e..1f49bfe68 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_aquaplanet-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_aquaplanet-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 468AD90D -Inner product checksum theta = 4FD68977 -Inner product checksum u = 6A4E37DC -Inner product checksum mr1 = 3F080035 -Inner product checksum mr2 = 36950EAB -Inner product checksum mr3 = 341282CE -Inner product checksum mr4 = 36954B26 +Inner product checksum rho = 468AD927 +Inner product checksum theta = 4FD68974 +Inner product checksum u = 6A4E3F58 +Inner product checksum mr1 = 3F07FDC4 +Inner product checksum mr2 = 3695CB0F +Inner product checksum mr3 = 3416AF74 +Inner product checksum mr4 = 3688F856 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_camembert_case3_gj1214b-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_camembert_case3_gj1214b-C12_ex1a_cce_fast-debug-32bit.txt index ef1ece08a..5edec3d07 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_camembert_case3_gj1214b-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_camembert_case3_gj1214b-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,3 @@ Inner product checksum rho = 44D9577E -Inner product checksum theta = 5504FC05 -Inner product checksum u = 74276D54 +Inner product checksum theta = 5504FC04 +Inner product checksum u = 74276D87 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9-C12_ex1a_cce_fast-debug-32bit.txt index 6930b382d..6b2aee26c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D65ED5 -Inner product checksum theta = 518E9154 -Inner product checksum u = 6AF6BB88 -Inner product checksum mr1 = 3FD1D787 -Inner product checksum mr2 = 375573C7 -Inner product checksum mr3 = 35272742 -Inner product checksum mr4 = 36B7B8B0 +Inner product checksum rho = 46D6659E +Inner product checksum theta = 518E92B2 +Inner product checksum u = 6AF645B2 +Inner product checksum mr1 = 3FD17BD6 +Inner product checksum mr2 = 374872C0 +Inner product checksum mr3 = 35460093 +Inner product checksum mr4 = 36D513C0 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt index c8b3d1923..82948a191 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD Inner product checksum rho = 46D64ED4 Inner product checksum theta = 51925235 Inner product checksum u = 6B22178C @@ -5,5 +6,14 @@ Inner product checksum mr1 = 3FCF5442 Inner product checksum mr2 = 372462AC Inner product checksum mr3 = 3535E787 Inner product checksum mr4 = 3694F3F9 +======= +Inner product checksum rho = 46D64EB7 +Inner product checksum theta = 51925204 +Inner product checksum u = 6B220318 +Inner product checksum mr1 = 3FCF4E45 +Inner product checksum mr2 = 37351348 +Inner product checksum mr3 = 353C1842 +Inner product checksum mr4 = 369D1690 +>>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 06beeb78f..8fbedb991 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD Inner product checksum rho = 48D65C78 Inner product checksum theta = 5399FF3A Inner product checksum u = 6B12FC35 @@ -5,5 +6,14 @@ Inner product checksum mr1 = 41CC3622 Inner product checksum mr2 = 39666129 Inner product checksum mr3 = 37C2BCF2 Inner product checksum mr4 = 39410CCE +======= +Inner product checksum rho = 48D65C71 +Inner product checksum theta = 5399FF3C +Inner product checksum u = 6B12FB2B +Inner product checksum mr1 = 41CC3802 +Inner product checksum mr2 = 3967ECD4 +Inner product checksum mr3 = 37C2B69E +Inner product checksum mr4 = 3941B53E +>>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt index e3bb16303..82b2dffdd 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD Inner product checksum rho = 46D64F0E Inner product checksum theta = 519252B6 Inner product checksum u = 6B21F8DF @@ -5,5 +6,14 @@ Inner product checksum mr1 = 3FCF5B9B Inner product checksum mr2 = 373A4AFB Inner product checksum mr3 = 35415408 Inner product checksum mr4 = 369D2D2F +======= +Inner product checksum rho = 46D64EEF +Inner product checksum theta = 5192521E +Inner product checksum u = 6B22308E +Inner product checksum mr1 = 3FCF4F09 +Inner product checksum mr2 = 3759E9CC +Inner product checksum mr3 = 354E368D +Inner product checksum mr4 = 36A1E498 +>>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 5580d1125..9d6fc7b87 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD Inner product checksum rho = 48D65C68 Inner product checksum theta = 5399FF3C Inner product checksum u = 6B12FAC5 @@ -5,5 +6,14 @@ Inner product checksum mr1 = 41CC35C6 Inner product checksum mr2 = 39684814 Inner product checksum mr3 = 37C23BEA Inner product checksum mr4 = 394151BA +======= +Inner product checksum rho = 48D65C63 +Inner product checksum theta = 5399FF3D +Inner product checksum u = 6B12FB74 +Inner product checksum mr1 = 41CC353D +Inner product checksum mr2 = 3961D6B7 +Inner product checksum mr3 = 37C2B434 +Inner product checksum mr4 = 39414ED7 +>>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt index e2379751a..f0bf8fec5 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD Inner product checksum rho = 48D65C64 Inner product checksum theta = 5399FF3C Inner product checksum u = 6B12FC7C @@ -5,5 +6,14 @@ Inner product checksum mr1 = 41CC368F Inner product checksum mr2 = 3968EBC8 Inner product checksum mr3 = 37C3DDBE Inner product checksum mr4 = 39418B9E +======= +Inner product checksum rho = 48D65C66 +Inner product checksum theta = 5399FF39 +Inner product checksum u = 6B12FCF8 +Inner product checksum mr1 = 41CC350C +Inner product checksum mr2 = 39652046 +Inner product checksum mr3 = 37C39FEA +Inner product checksum mr4 = 394124EC +>>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem-C12_ex1a_cce_fast-debug-32bit.txt index 0872aa33f..1803e212b 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D66738 -Inner product checksum theta = 518E904E -Inner product checksum u = 6AF77F74 -Inner product checksum mr1 = 3FD1D652 -Inner product checksum mr2 = 374C7DF4 -Inner product checksum mr3 = 3537E339 -Inner product checksum mr4 = 36BBF5AB +Inner product checksum rho = 46D665F0 +Inner product checksum theta = 518E903E +Inner product checksum u = 6AF66607 +Inner product checksum mr1 = 3FD1CEB7 +Inner product checksum mr2 = 3750C0F4 +Inner product checksum mr3 = 35308456 +Inner product checksum mr4 = 36C50D71 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt index b3b9962c9..c17e9d7f3 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD Inner product checksum rho = 46D64E55 Inner product checksum theta = 5192505F Inner product checksum u = 6B229367 @@ -5,5 +6,14 @@ Inner product checksum mr1 = 3FCF6020 Inner product checksum mr2 = 373F199A Inner product checksum mr3 = 353B0547 Inner product checksum mr4 = 36A86813 +======= +Inner product checksum rho = 46D64E7A +Inner product checksum theta = 51925011 +Inner product checksum u = 6B22BF73 +Inner product checksum mr1 = 3FCF5905 +Inner product checksum mr2 = 37435010 +Inner product checksum mr3 = 3542184C +Inner product checksum mr4 = 36AEB332 +>>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt index 97d4521e7..f422135c4 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD Inner product checksum rho = 46D64D63 Inner product checksum theta = 5192507D Inner product checksum u = 6B227EE7 @@ -5,5 +6,14 @@ Inner product checksum mr1 = 3FCF5DC4 Inner product checksum mr2 = 373BAE4C Inner product checksum mr3 = 353CA71C Inner product checksum mr4 = 36AB2010 +======= +Inner product checksum rho = 46D64DFC +Inner product checksum theta = 51924FF0 +Inner product checksum u = 6B227D3C +Inner product checksum mr1 = 3FCF3F5B +Inner product checksum mr2 = 373A7C56 +Inner product checksum mr3 = 353EAD7B +Inner product checksum mr4 = 36A63314 +>>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_comp_tran_ref_3d_l120-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_comp_tran_ref_3d_l120-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt index b3e73564f..8bd71eba7 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_comp_tran_ref_3d_l120-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_comp_tran_ref_3d_l120-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 489A8522 -Inner product checksum theta = 51BA4FE6 -Inner product checksum u = 5F118A4F -Inner product checksum mr1 = 4187BD7F -Inner product checksum mr2 = 3AEF033C -Inner product checksum mr3 = 34FA5E1D +Inner product checksum rho = 489A8379 +Inner product checksum theta = 51BA505B +Inner product checksum u = 5F118CC2 +Inner product checksum mr1 = 4187C6A4 +Inner product checksum mr2 = 3AF39B2F +Inner product checksum mr3 = 34D56FED Inner product checksum mr4 = 0 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_hd209458b-C24_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_hd209458b-C24_ex1a_cce_fast-debug-32bit.txt index 863b5e1bb..0c8494eec 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_hd209458b-C24_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_hd209458b-C24_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 4798D953 +Inner product checksum rho = 4798D952 Inner product checksum theta = 58406A9C -Inner product checksum u = 79BA72D7 +Inner product checksum u = 79BA72A4 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_casim-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_casim-C12_ex1a_cce_fast-debug-32bit.txt index 603d8b9e1..b2f8542fb 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_casim-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_casim-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D855AC -Inner product checksum theta = 518BD624 -Inner product checksum u = 6A8B0B51 -Inner product checksum mr1 = 3FCCF367 -Inner product checksum mr2 = 38328540 -Inner product checksum mr3 = 357981E4 -Inner product checksum mr4 = 36B5FAE4 -Inner product checksum mr5 = 2F1AC995 -Inner product checksum mr6 = 35293B10 +Inner product checksum rho = 46D85C1E +Inner product checksum theta = 518BD68E +Inner product checksum u = 6A8AB4A2 +Inner product checksum mr1 = 3FCD6B98 +Inner product checksum mr2 = 3834A23C +Inner product checksum mr3 = 35462D21 +Inner product checksum mr4 = 36C2FB8E +Inner product checksum mr5 = 2E9A3459 +Inner product checksum mr6 = 355C98F6 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_coma9-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_coma9-C12_ex1a_cce_fast-debug-32bit.txt index a69f942b8..8d6f364b6 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_coma9-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_coma9-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8454B -Inner product checksum theta = 518BD61E -Inner product checksum u = 6A87A06A -Inner product checksum mr1 = 3FCFCE7A -Inner product checksum mr2 = 37DB1972 -Inner product checksum mr3 = 378F88E1 -Inner product checksum mr4 = 379C4AD4 -Inner product checksum mr5 = 36B0A58C +Inner product checksum rho = 46D8450A +Inner product checksum theta = 518BD8F0 +Inner product checksum u = 6A87D5CF +Inner product checksum mr1 = 3FCF848A +Inner product checksum mr2 = 37EF578A +Inner product checksum mr3 = 37A268D4 +Inner product checksum mr4 = 37A12861 +Inner product checksum mr5 = 36AF6891 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_dev-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_dev-C12_ex1a_cce_fast-debug-32bit.txt index b31ad30a5..528c8a616 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_dev-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_dev-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D832C7 -Inner product checksum theta = 518BE11A -Inner product checksum u = 6A862AEE -Inner product checksum mr1 = 3FD13F95 -Inner product checksum mr2 = 3800AEF8 -Inner product checksum mr3 = 3782FC11 -Inner product checksum mr4 = 37CA3097 -Inner product checksum mr5 = 36BBFCEE +Inner product checksum rho = 46D832D6 +Inner product checksum theta = 518BE1F6 +Inner product checksum u = 6A86BC76 +Inner product checksum mr1 = 3FD120E6 +Inner product checksum mr2 = 37FAD7AC +Inner product checksum mr3 = 376811C0 +Inner product checksum mr4 = 37BFF8BC +Inner product checksum mr5 = 3697AF6E Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_tb-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_tb-C12_ex1a_cce_fast-debug-32bit.txt index 364970a70..c17987500 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_tb-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_comorph_tb-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D853F8 -Inner product checksum theta = 518BDF54 -Inner product checksum u = 6A853587 -Inner product checksum mr1 = 3FCE7C52 -Inner product checksum mr2 = 37EEF002 -Inner product checksum mr3 = 378485B2 -Inner product checksum mr4 = 37548C69 -Inner product checksum mr5 = 35F51F27 +Inner product checksum rho = 46D8528E +Inner product checksum theta = 518BDFC0 +Inner product checksum u = 6A84BE51 +Inner product checksum mr1 = 3FCE1718 +Inner product checksum mr2 = 37F0E036 +Inner product checksum mr3 = 37746CB5 +Inner product checksum mr4 = 375B7784 +Inner product checksum mr5 = 35F5451D Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt index f229e7f3f..3defd3bad 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D83A9E -Inner product checksum theta = 518BD606 -Inner product checksum u = 6A88ADC8 -Inner product checksum mr1 = 3FD03C7C -Inner product checksum mr2 = 37C3F533 -Inner product checksum mr3 = 35C36C19 -Inner product checksum mr4 = 370CC3B2 +Inner product checksum rho = 46D83942 +Inner product checksum theta = 518BD198 +Inner product checksum u = 6A8858C5 +Inner product checksum mr1 = 3FD03D69 +Inner product checksum mr2 = 37C68732 +Inner product checksum mr3 = 35A338B2 +Inner product checksum mr4 = 372B63E6 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt index 25ca673cd..1e17cfead 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C12_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 40DB0749E54B740A -Inner product checksum theta = 42317AA6B6965E52 -Inner product checksum u = 45511914A84F3426 -Inner product checksum mr1 = 3FFA01CE1D991E50 -Inner product checksum mr2 = 3EF86542018C3171 -Inner product checksum mr3 = 3EB34161DA84C4AA -Inner product checksum mr4 = 3EE453B24C60F036 +Inner product checksum rho = 40DB0770E3192095 +Inner product checksum theta = 42317AE3AD158CC4 +Inner product checksum u = 455118036F27A992 +Inner product checksum mr1 = 3FF9FB92A4B6D4E0 +Inner product checksum mr2 = 3EFA9528278A8038 +Inner product checksum mr3 = 3EB5BDCF89E24FCD +Inner product checksum mr4 = 3EE810E99B341094 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt index 4049ded94..5caec27d7 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE1D -Inner product checksum theta = 5392A6CF -Inner product checksum u = 6A97C11B -Inner product checksum mr1 = 41CD0E79 -Inner product checksum mr2 = 39CBC7FB -Inner product checksum mr3 = 37B4CC21 -Inner product checksum mr4 = 395E9DF0 +Inner product checksum rho = 48D7FDC2 +Inner product checksum theta = 5392A6CA +Inner product checksum u = 6A97C06C +Inner product checksum mr1 = 41CCFFD6 +Inner product checksum mr2 = 39CB289D +Inner product checksum mr3 = 37B0138E +Inner product checksum mr4 = 3962555F Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-pert-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-pert-C12_ex1a_cce_fast-debug-32bit.txt index e94c0d2fc..e3aa91e3c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-pert-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9-pert-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8132D +Inner product checksum rho = 46D81338 Inner product checksum theta = 51944576 -Inner product checksum u = 6B46409A -Inner product checksum mr1 = 3FC882C1 -Inner product checksum mr2 = 379A3C14 -Inner product checksum mr3 = 35A816D6 -Inner product checksum mr4 = 378827B2 +Inner product checksum u = 6B463F06 +Inner product checksum mr1 = 3FC88651 +Inner product checksum mr2 = 37A36829 +Inner product checksum mr3 = 35A6D95D +Inner product checksum mr4 = 37887FC4 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt index d8cb2c310..89b940bb6 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD Inner product checksum rho = 46D7F80B Inner product checksum theta = 518E7E99 Inner product checksum u = 6B17D4FF @@ -5,5 +6,14 @@ Inner product checksum mr1 = 3FCBD659 Inner product checksum mr2 = 37B236A6 Inner product checksum mr3 = 34A5A053 Inner product checksum mr4 = 36D44E0C +======= +Inner product checksum rho = 46D7F858 +Inner product checksum theta = 518E7E7A +Inner product checksum u = 6B17CC75 +Inner product checksum mr1 = 3FCBD462 +Inner product checksum mr2 = 37AD8A40 +Inner product checksum mr3 = 34B9932D +Inner product checksum mr4 = 36C12B34 +>>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 7b3ee6906..c7614959f 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD Inner product checksum rho = 48D7FE2D Inner product checksum theta = 5392A6D4 Inner product checksum u = 6A97C0DF @@ -5,5 +6,14 @@ Inner product checksum mr1 = 41CD04C1 Inner product checksum mr2 = 39CA5528 Inner product checksum mr3 = 37B1EAB4 Inner product checksum mr4 = 395FCD3E +======= +Inner product checksum rho = 48D7FDC2 +Inner product checksum theta = 5392A6CA +Inner product checksum u = 6A97C06C +Inner product checksum mr1 = 41CCFFD6 +Inner product checksum mr2 = 39CB289D +Inner product checksum mr3 = 37B0138E +Inner product checksum mr4 = 3962555F +>>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt index 90e90700d..3ef94540b 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD Inner product checksum rho = 46D7F7B2 Inner product checksum theta = 518E7E91 Inner product checksum u = 6B17E76D @@ -5,5 +6,14 @@ Inner product checksum mr1 = 3FCBDCCA Inner product checksum mr2 = 37AD3A88 Inner product checksum mr3 = 34A30ABE Inner product checksum mr4 = 36C72094 +======= +Inner product checksum rho = 46D7F7C0 +Inner product checksum theta = 518E7EA0 +Inner product checksum u = 6B17D322 +Inner product checksum mr1 = 3FCBE140 +Inner product checksum mr2 = 37A8EADE +Inner product checksum mr3 = 349D5EB2 +Inner product checksum mr4 = 36BD9099 +>>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt index edd121f2b..84700e62c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD Inner product checksum rho = 48D7FE09 Inner product checksum theta = 5392A6A6 Inner product checksum u = 6A97C6D7 @@ -5,5 +6,14 @@ Inner product checksum mr1 = 41CD07AC Inner product checksum mr2 = 39CC8D0A Inner product checksum mr3 = 37A7F56E Inner product checksum mr4 = 395F95E3 +======= +Inner product checksum rho = 48D7FE02 +Inner product checksum theta = 5392A6B8 +Inner product checksum u = 6A97C654 +Inner product checksum mr1 = 41CD029C +Inner product checksum mr2 = 39CE5000 +Inner product checksum mr3 = 37ACA3FB +Inner product checksum mr4 = 396055DE +>>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt index 228591ff2..f9df60826 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FD2E -Inner product checksum theta = 5392A6CB -Inner product checksum u = 6A97B1DC -Inner product checksum mr1 = 41CD03FE -Inner product checksum mr2 = 39CA6F7E -Inner product checksum mr3 = 37AB038A -Inner product checksum mr4 = 39612D9E +Inner product checksum rho = 48D7FCFF +Inner product checksum theta = 5392A6F0 +Inner product checksum u = 6A97B7D3 +Inner product checksum mr1 = 41CD0DDA +Inner product checksum mr2 = 39CD2EE0 +Inner product checksum mr3 = 37B6DDF3 +Inner product checksum mr4 = 3963190E Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt index ebcb6239a..756603179 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD Inner product checksum rho = 48D7FDE7 Inner product checksum theta = 5392A6B4 Inner product checksum u = 6A97C5B0 @@ -5,5 +6,14 @@ Inner product checksum mr1 = 41CCFEAA Inner product checksum mr2 = 39CB6F38 Inner product checksum mr3 = 37AB8F97 Inner product checksum mr4 = 396154CC +======= +Inner product checksum rho = 48D7FDF2 +Inner product checksum theta = 5392A6C1 +Inner product checksum u = 6A97C07E +Inner product checksum mr1 = 41CD05C2 +Inner product checksum mr2 = 39C9FA29 +Inner product checksum mr3 = 37B66B12 +Inner product checksum mr4 = 39605796 +>>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_ex1a_cce_fast-debug-32bit.txt index 7fd7028b6..7d15a5c26 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FE68 -Inner product checksum theta = 5392A6B0 -Inner product checksum u = 6A97BDFC -Inner product checksum mr1 = 41CD09E6 -Inner product checksum mr2 = 39CB109F -Inner product checksum mr3 = 37B878FC -Inner product checksum mr4 = 39607E2D +Inner product checksum rho = 48D7FE88 +Inner product checksum theta = 5392A6C2 +Inner product checksum u = 6A97BFB9 +Inner product checksum mr1 = 41CD0697 +Inner product checksum mr2 = 39C8DC60 +Inner product checksum mr3 = 37B00779 +Inner product checksum mr4 = 395B6E15 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast-debug-32bit.txt index ab192638a..bbc606f94 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FC82 -Inner product checksum theta = 5392A69E -Inner product checksum u = 6A97C25C -Inner product checksum mr1 = 41CCEBDE -Inner product checksum mr2 = 39CBE372 -Inner product checksum mr3 = 37AB5A5A -Inner product checksum mr4 = 396E0877 +Inner product checksum rho = 48D7FC63 +Inner product checksum theta = 5392A688 +Inner product checksum u = 6A97C7E2 +Inner product checksum mr1 = 41CCE1BA +Inner product checksum mr2 = 39CC1EA5 +Inner product checksum mr3 = 37B52B9E +Inner product checksum mr4 = 3971E51F Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt index df05f9b38..6fbce5e9f 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48D7FB45 -Inner product checksum theta = 5392A6CE -Inner product checksum u = 6A97B522 -Inner product checksum mr1 = 41CCE34E -Inner product checksum mr2 = 39CDB788 -Inner product checksum mr3 = 37B0BD0B -Inner product checksum mr4 = 3971F8B0 +Inner product checksum rho = 48D7FB44 +Inner product checksum theta = 5392A6B6 +Inner product checksum u = 6A97B404 +Inner product checksum mr1 = 41CCE89F +Inner product checksum mr2 = 39CC1B52 +Inner product checksum mr3 = 37AE1DF8 +Inner product checksum mr4 = 397813E2 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_da-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_da-C12_ex1a_cce_fast-debug-32bit.txt index f1ce1a6a5..4b98b2ae7 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_da-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_da-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D81361 -Inner product checksum theta = 518BD72E -Inner product checksum u = 6A879BF4 -Inner product checksum mr1 = 3FD3EFBC -Inner product checksum mr2 = 37E9B6CE -Inner product checksum mr3 = 35A5B38A -Inner product checksum mr4 = 36FF49FA +Inner product checksum rho = 46D81300 +Inner product checksum theta = 518BD591 +Inner product checksum u = 6A86E3C2 +Inner product checksum mr1 = 3FD3C193 +Inner product checksum mr2 = 37E8C1CE +Inner product checksum mr3 = 35B99320 +Inner product checksum mr4 = 36D70E14 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C12_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C12_ex1a_cce_full-debug-32bit.txt index a8f12811b..6b296c277 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C12_ex1a_cce_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C12_ex1a_cce_full-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D8046A +Inner product checksum rho = 46D8046D Inner product checksum theta = 519522B0 -Inner product checksum u = 6AE67750 -Inner product checksum mr1 = 3FC86222 -Inner product checksum mr2 = 37CDEADC -Inner product checksum mr3 = 352270CC -Inner product checksum mr4 = 36EFCB52 +Inner product checksum u = 6AE67712 +Inner product checksum mr1 = 3FC861DE +Inner product checksum mr2 = 37CDBC97 +Inner product checksum mr3 = 352223A1 +Inner product checksum mr4 = 36EFD230 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C48_MG_ex1a_cce_full-debug-32bit.txt index 0b1bdfe3c..4b358888f 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C48_MG_ex1a_cce_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_debug-C48_MG_ex1a_cce_full-debug-32bit.txt @@ -1,9 +1,9 @@ Inner product checksum rho = 48D81494 -Inner product checksum theta = 53952666 -Inner product checksum u = 6AA4D6E5 -Inner product checksum mr1 = 41C830F8 -Inner product checksum mr2 = 399A1FF4 -Inner product checksum mr3 = 3778B18D -Inner product checksum mr4 = 39303F08 +Inner product checksum theta = 53952667 +Inner product checksum u = 6AA4D6DD +Inner product checksum mr1 = 41C83143 +Inner product checksum mr2 = 399A84AB +Inner product checksum mr3 = 377973DB +Inner product checksum mr4 = 3930117B Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt index 4c0db20d6..7a5e3cff4 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D816FB -Inner product checksum theta = 518BB19A -Inner product checksum u = 6A8CE9A6 -Inner product checksum mr1 = 3FD15D9C -Inner product checksum mr2 = 37E05F1A -Inner product checksum mr3 = 359D7657 -Inner product checksum mr4 = 371EA656 +Inner product checksum rho = 46D818B8 +Inner product checksum theta = 518BB117 +Inner product checksum u = 6A8D23A8 +Inner product checksum mr1 = 3FD1137A +Inner product checksum mr2 = 37DB360D +Inner product checksum mr3 = 35A031F6 +Inner product checksum mr4 = 370B3EBC Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda_jada-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda_jada-C12_ex1a_cce_fast-debug-32bit.txt index 71be144aa..aa2bed702 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda_jada-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_eda_jada-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D81244 -Inner product checksum theta = 518BD146 -Inner product checksum u = 6A881176 -Inner product checksum mr1 = 3FD3BAA8 -Inner product checksum mr2 = 37D8C332 -Inner product checksum mr3 = 35A36F58 -Inner product checksum mr4 = 37197323 +Inner product checksum rho = 46D813AE +Inner product checksum theta = 518BD182 +Inner product checksum u = 6A884A33 +Inner product checksum mr1 = 3FD3B2DE +Inner product checksum mr2 = 37DA9C3A +Inner product checksum mr3 = 35940F5E +Inner product checksum mr4 = 3712DD31 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt index e4e1028e2..440c859d0 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_mol-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D86092 -Inner product checksum theta = 5193AEBE -Inner product checksum u = 6A85A810 -Inner product checksum mr1 = 3FD030B5 -Inner product checksum mr2 = 37A7E2AE -Inner product checksum mr3 = 356CF9AC -Inner product checksum mr4 = 3709C3DE +Inner product checksum rho = 46D85DEA +Inner product checksum theta = 5193AF22 +Inner product checksum u = 6A865782 +Inner product checksum mr1 = 3FD05C10 +Inner product checksum mr2 = 37AECC7C +Inner product checksum mr3 = 35555AD4 +Inner product checksum mr4 = 36CEE5C2 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_cce_fast-debug-32bit.txt index 5907893fc..a9cda3d60 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,12 +1,3 @@ -<<<<<<< HEAD -Inner product checksum rho = 46D7F59C -Inner product checksum theta = 518E7EE5 -Inner product checksum u = 6B179DE9 -Inner product checksum mr1 = 3FCBCBA6 -Inner product checksum mr2 = 37BBC5DC -Inner product checksum mr3 = 34DAED31 -Inner product checksum mr4 = 36F7A6BF -======= Inner product checksum rho = 46D7F53F Inner product checksum theta = 518E7EF8 Inner product checksum u = 6B17A164 @@ -14,6 +5,5 @@ Inner product checksum mr1 = 3FCBDDC0 Inner product checksum mr2 = 37B65076 Inner product checksum mr3 = 34AF8D37 Inner product checksum mr4 = 36FD8E6A ->>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 41f8ed0d3..2d055cced 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,12 +1,3 @@ -<<<<<<< HEAD -Inner product checksum rho = 48D7FC4F -Inner product checksum theta = 5392A682 -Inner product checksum u = 6A97C480 -Inner product checksum mr1 = 41CCEFF8 -Inner product checksum mr2 = 39C97469 -Inner product checksum mr3 = 37B0B7EA -Inner product checksum mr4 = 39703802 -======= Inner product checksum rho = 48D7FC49 Inner product checksum theta = 5392A69F Inner product checksum u = 6A97BDE8 @@ -14,6 +5,5 @@ Inner product checksum mr1 = 41CCE85E Inner product checksum mr2 = 39CAFA12 Inner product checksum mr3 = 37ABD166 Inner product checksum mr4 = 3973E9E8 ->>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_cce_fast-debug-32bit.txt index cd0978110..973d78bb8 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,12 +1,3 @@ -<<<<<<< HEAD -Inner product checksum rho = 46D7F631 -Inner product checksum theta = 518E7EEC -Inner product checksum u = 6B178506 -Inner product checksum mr1 = 3FCBCBCA -Inner product checksum mr2 = 37B2545E -Inner product checksum mr3 = 3501B921 -Inner product checksum mr4 = 36FB8BCA -======= Inner product checksum rho = 46D7F57C Inner product checksum theta = 518E7EDE Inner product checksum u = 6B17A83B @@ -14,6 +5,5 @@ Inner product checksum mr1 = 3FCBE8E8 Inner product checksum mr2 = 37AA5510 Inner product checksum mr3 = 34A43776 Inner product checksum mr4 = 36EB4854 ->>>>>>> main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt index e294f2672..a3af9fcda 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,12 +1,4 @@ -<<<<<<< HEAD -Inner product checksum rho = 48D7FC4E -Inner product checksum theta = 5392A68C -Inner product checksum u = 6A97BB8A -Inner product checksum mr1 = 41CCF5C8 -Inner product checksum mr2 = 39CC6698 -Inner product checksum mr3 = 37AF4539 -Inner product checksum mr4 = 39749D8C -======= + Inner product checksum rho = 48D7FC5D Inner product checksum theta = 5392A66D Inner product checksum u = 6A97C28C @@ -14,6 +6,6 @@ Inner product checksum mr1 = 41CCEB8E Inner product checksum mr2 = 39CA5305 Inner product checksum mr3 = 37AD7626 Inner product checksum mr4 = 39706818 ->>>>>>> main +>>>>>>> upstream/main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt index 197e914e4..e5354a8b9 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit.txt @@ -1,12 +1,3 @@ -<<<<<<< HEAD -Inner product checksum rho = 48D7FB4F -Inner product checksum theta = 5392A6DD -Inner product checksum u = 6A97B5E8 -Inner product checksum mr1 = 41CCEB17 -Inner product checksum mr2 = 39CCC927 -Inner product checksum mr3 = 37AB0272 -Inner product checksum mr4 = 3973F64E -======= Inner product checksum rho = 48D7FB5E Inner product checksum theta = 5392A6DE Inner product checksum u = 6A97B4CC @@ -14,6 +5,6 @@ Inner product checksum mr1 = 41CCEE7C Inner product checksum mr2 = 39CC8EE4 Inner product checksum mr3 = 37AE7CC2 Inner product checksum mr4 = 39706A08 ->>>>>>> main +>>>>>>> upstream/main Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt index 65b3227da..a9ffceead 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,19 +1,9 @@ -<<<<<<< HEAD -Inner product checksum rho = 48D7FC75 -Inner product checksum theta = 5392A68E -Inner product checksum u = 6A97C4A5 -Inner product checksum mr1 = 41CCEB50 -Inner product checksum mr2 = 39C96BCE -Inner product checksum mr3 = 37A8CD87 -Inner product checksum mr4 = 39729776 -======= -Inner product checksum rho = 48D7FC40 -Inner product checksum theta = 5392A6BA -Inner product checksum u = 6A97BD27 -Inner product checksum mr1 = 41CCECED -Inner product checksum mr2 = 39CACD31 -Inner product checksum mr3 = 37AA4DCC -Inner product checksum mr4 = 39717CDB ->>>>>>> main +Inner product checksum rho = 48D7FC4A +Inner product checksum theta = 5392A66A +Inner product checksum u = 6A97BE23 +Inner product checksum mr1 = 41CCE6A6 +Inner product checksum mr2 = 39CB60DC +Inner product checksum mr3 = 37AF065D +Inner product checksum mr4 = 3973921C Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_short-C12_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_short-C12_ex1a_cce_fast-debug-32bit.txt index 57e93ca73..453cf594b 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_short-C12_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_nwp_gal9_short-C12_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 46D7FC01 -Inner product checksum theta = 5195576B -Inner product checksum u = 6B246E86 -Inner product checksum mr1 = 3FC8531A -Inner product checksum mr2 = 381E2A7A -Inner product checksum mr3 = 35639318 -Inner product checksum mr4 = 36F6E177 +Inner product checksum rho = 46D80CA6 +Inner product checksum theta = 5194ED76 +Inner product checksum u = 6B08591A +Inner product checksum mr1 = 3FC88034 +Inner product checksum mr2 = 37C26C0C +Inner product checksum mr3 = 35767D74 +Inner product checksum mr4 = 372A0F68 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt index 88d918e4f..317acc6a4 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 483997E0 +Inner product checksum rho = 483997DE Inner product checksum theta = 51354909 -Inner product checksum u = 612F5E12 -Inner product checksum mr1 = 4090F574 -Inner product checksum mr2 = 359E2947 -Inner product checksum mr3 = 2FA5383D -Inner product checksum mr4 = 33F4FD3D -Inner product checksum mr5 = BE83A40 +Inner product checksum u = 612F5E11 +Inner product checksum mr1 = 4090F5E4 +Inner product checksum mr2 = 358EB0BA +Inner product checksum mr3 = 2FA519F0 +Inner product checksum mr4 = 33F4FD57 +Inner product checksum mr5 = BE85FEC Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt index 496214f60..7b6d5479c 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 483997E2 -Inner product checksum theta = 513548FF -Inner product checksum u = 612F5EAE -Inner product checksum mr1 = 40910F1A -Inner product checksum mr2 = 35DA02DE -Inner product checksum mr3 = 2FA7D591 -Inner product checksum mr4 = 33F4FFDB -Inner product checksum mr5 = BE04C41 +Inner product checksum rho = 483997E3 +Inner product checksum theta = 51354900 +Inner product checksum u = 612F5EB6 +Inner product checksum mr1 = 40910DBB +Inner product checksum mr2 = 3600A9CC +Inner product checksum mr3 = 2FA77A9F +Inner product checksum mr4 = 33F4FFEC +Inner product checksum mr5 = BE04B21 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt index 762b7d534..24e480b50 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 48398C6B +Inner product checksum rho = 48398C6A Inner product checksum theta = 51354302 -Inner product checksum u = 612EDCB8 -Inner product checksum mr1 = 40910318 -Inner product checksum mr2 = 358D990B -Inner product checksum mr3 = 3000FA6D +Inner product checksum u = 612EDCAC +Inner product checksum mr1 = 40910338 +Inner product checksum mr2 = 35876274 +Inner product checksum mr3 = 30010BB7 Inner product checksum mr4 = 3404AC2D -Inner product checksum mr5 = C14A227 +Inner product checksum mr5 = C14A22D Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt index 75447de07..d6c9e6e85 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_rce-BiP64x64-1500x1500_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 4830B656 -Inner product checksum theta = 513FD828 -Inner product checksum u = 5F74B234 -Inner product checksum mr1 = 4155C07E -Inner product checksum mr2 = 3A3F9096 -Inner product checksum mr3 = 3087D161 +Inner product checksum rho = 4830B653 +Inner product checksum theta = 513FD830 +Inner product checksum u = 5F74B058 +Inner product checksum mr1 = 4155BC4A +Inner product checksum mr2 = 3A3F75A2 +Inner product checksum mr3 = 3088CA46 Inner product checksum mr4 = 0 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_thai_ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_thai_ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt index 70a3b9aa3..e78d4e606 100644 --- a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_thai_ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_thai_ben1-C48_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 486B4A16 -Inner product checksum theta = 51CABEF2 -Inner product checksum u = 63C9A27B +Inner product checksum rho = 486B4A14 +Inner product checksum theta = 51CABEF1 +Inner product checksum u = 63C9A16C diff --git a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt index c1c182308..c3d509995 100644 --- a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 411B540E5411F39A -Inner product checksum theta = 42735B1C299697A7 -Inner product checksum u = 456F4279C103EE2D -Inner product checksum mr1 = 403684723302B41C -Inner product checksum mr2 = 3F4016DC8FA8F38B -Inner product checksum mr3 = 3F023D350BC0234C -Inner product checksum mr4 = 3F364564E06304AC +Inner product checksum rho = 411B5407F4CE40FD +Inner product checksum theta = 42735B1EDCE5682D +Inner product checksum u = 456F41EDCEE58D54 +Inner product checksum mr1 = 4036855990B99604 +Inner product checksum mr2 = 3F4021291625C39B +Inner product checksum mr3 = 3F00980BB1AF46A0 +Inner product checksum mr4 = 3F368688EE9DBAD2 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_dcmip301-C24_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_dcmip301-C24_azspice_gnu_fast-debug-64bit.txt index 7e2da881a..6b4b2fab9 100644 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_dcmip301-C24_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_dcmip301-C24_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3F2022594816DB4A -Inner product checksum theta = 4033068A55A83CF8 -Inner product checksum u = 433056118E026D02 +Inner product checksum rho = 3F20225948327449 +Inner product checksum theta = 4033068A55E5336A +Inner product checksum u = 433056118E515C60 diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt index 421106c0a..48d058c8b 100644 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA958AB1C8F215C -Inner product checksum theta = 416354444EC30001 -Inner product checksum u = 456C296AB5699467 -Inner product checksum mr1 = 3F3BB706EC65A9C8 -Inner product checksum mr2 = 3EEB5F98BD833463 -Inner product checksum mr3 = 3EE049E45013AA3C -Inner product checksum mr4 = 3EED67E57E3C63B8 +Inner product checksum rho = 3FA509A05A373B23 +Inner product checksum theta = 41610F1B6ABD09B0 +Inner product checksum u = 45688F5F19933A2F +Inner product checksum mr1 = 3F35BCF4D7DD3124 +Inner product checksum mr2 = 3EEAFF88125CD2E4 +Inner product checksum mr3 = 3EE049CB61EE38FC +Inner product checksum mr4 = 3EED5E034DF58BB4 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit.txt index 8aa8b38c8..49730ad8f 100644 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9-C12_MG_azspice_gnu_production-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3D4AC91A -Inner product checksum theta = 4B1AA02F -Inner product checksum u = 6B614861 -Inner product checksum mr1 = 39DDB434 -Inner product checksum mr2 = 375B0535 -Inner product checksum mr3 = 37024C16 -Inner product checksum mr4 = 376B4B8D +Inner product checksum rho = 3D284CEE +Inner product checksum theta = 4B087745 +Inner product checksum u = 6B447884 +Inner product checksum mr1 = 39ADE81D +Inner product checksum mr2 = 37580586 +Inner product checksum mr3 = 37024B58 +Inner product checksum mr4 = 376AFC3F Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit.txt index 16ae3f01f..b1f6fd6ff 100644 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 40C231C005491FDA -Inner product checksum theta = 43076F9C99ACD554 -Inner product checksum u = 4697A0E8F7E333C4 -Inner product checksum mr1 = 40A1E7982CFF402D -Inner product checksum mr2 = 4069A4088DCC70F6 -Inner product checksum mr3 = 4069ABB4FA045ED2 -Inner product checksum mr4 = 406986D0FD3118C3 +Inner product checksum rho = 40AFD0F64A85F322 +Inner product checksum theta = 43076FC46F15B98E +Inner product checksum u = 4697A257F5DA33B8 +Inner product checksum mr1 = 4087B978652013B5 +Inner product checksum mr2 = 406997D34AFE58E4 +Inner product checksum mr3 = 4069A875F066DF80 +Inner product checksum mr4 = 406986D990E6CEA9 Inner product checksum mr5 = 406997D0C9B8EEFB Inner product checksum mr6 = 40699547929283AC diff --git a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_semi-implicit-C12_azspice_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_semi-implicit-C12_azspice_gnu_fast-debug-64bit.txt index f7e9ed399..26185b0b3 100644 --- a/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_semi-implicit-C12_azspice_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/azspice/checksum_linear_model_semi-implicit-C12_azspice_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3EED280BC778BD3B -Inner product checksum theta = 4012F415A1A3F24B -Inner product checksum u = 43A4936A5FD755CE +Inner product checksum rho = 3EED280BC77910C4 +Inner product checksum theta = 4012F415A1A3DFEB +Inner product checksum u = 43A4936A5FD74DF4 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt index 489629753..9ea9f30ef 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_dcmip301-C24_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3F20225947FE2721 -Inner product checksum theta = 4033068A55825E07 -Inner product checksum u = 433056118DDB6C73 +Inner product checksum rho = 3F20225948390658 +Inner product checksum theta = 4033068A55BC3748 +Inner product checksum u = 433056118E328CBC diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt index 5fe96f825..5dfff90ae 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3D4ACC8C -Inner product checksum theta = 4B1AA1D6 -Inner product checksum u = 6B614B12 -Inner product checksum mr1 = 39DDB998 -Inner product checksum mr2 = 375B14A9 -Inner product checksum mr3 = 370257FE -Inner product checksum mr4 = 376B5554 +Inner product checksum rho = 3D284C78 +Inner product checksum theta = 4B087863 +Inner product checksum u = 6B447A8E +Inner product checksum mr1 = 39ADE62A +Inner product checksum mr2 = 37581360 +Inner product checksum mr3 = 37025739 +Inner product checksum mr4 = 376B0645 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt index 20967b74d..06fa02a65 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA958AC4162D8F0 -Inner product checksum theta = 416354449382FE11 -Inner product checksum u = 456C296A9A33850C -Inner product checksum mr1 = 3F3BB6FD50C56574 -Inner product checksum mr2 = 3EEB5F9899A9A229 -Inner product checksum mr3 = 3EE049E44867A84F -Inner product checksum mr4 = 3EED67E5450F9EB0 +Inner product checksum rho = 3FA5099F6003533A +Inner product checksum theta = 41610F1B43DFDDB2 +Inner product checksum u = 45688F5EC2FBF69A +Inner product checksum mr1 = 3F35BCF98E9C5B10 +Inner product checksum mr2 = 3EEAFF88D33E0CFE +Inner product checksum mr3 = 3EE049CB63E270F4 +Inner product checksum mr4 = 3EED5E03840E2812 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit.txt index 1f09faaff..d1df98ac3 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3D4AF5EF -Inner product checksum theta = 4B1A9F77 -Inner product checksum u = 6B614765 -Inner product checksum mr1 = 39DDC786 -Inner product checksum mr2 = 375B192D -Inner product checksum mr3 = 37024E62 -Inner product checksum mr4 = 376B2AC4 +Inner product checksum rho = 3D284AE2 +Inner product checksum theta = 4B0877EC +Inner product checksum u = 6B4479D3 +Inner product checksum mr1 = 39ADE43E +Inner product checksum mr2 = 37581886 +Inner product checksum mr3 = 37024D8F +Inner product checksum mr4 = 376ADB79 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit.txt index d80bc6836..bcfb6e282 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_cce_production-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA958AFC1300C5F -Inner product checksum theta = 416354451DB94E92 -Inner product checksum u = 456C296BA4F92026 -Inner product checksum mr1 = 3F3BB6CB15DAEC60 -Inner product checksum mr2 = 3EEB5F996184621F -Inner product checksum mr3 = 3EE049E446E7CC14 -Inner product checksum mr4 = 3EED67E59B126122 +Inner product checksum rho = 3FA509A35A558386 +Inner product checksum theta = 41610F1C92657C34 +Inner product checksum u = 45688F61E0CB5BE5 +Inner product checksum mr1 = 3F35BCE5306E6416 +Inner product checksum mr2 = 3EEAFF88AFF1C5F2 +Inner product checksum mr3 = 3EE049CB62F1062E +Inner product checksum mr4 = 3EED5E036CB1379F Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt index 0d5740092..9331aab13 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3D4ACA0E -Inner product checksum theta = 4B1AA0CD -Inner product checksum u = 6B614976 -Inner product checksum mr1 = 39DDB942 -Inner product checksum mr2 = 375B1238 -Inner product checksum mr3 = 3702521F -Inner product checksum mr4 = 376B4EC3 +Inner product checksum rho = 3D284C91 +Inner product checksum theta = 4B087777 +Inner product checksum u = 6B4478FE +Inner product checksum mr1 = 39ADE81E +Inner product checksum mr2 = 375811AE +Inner product checksum mr3 = 37025154 +Inner product checksum mr4 = 376AFFAE Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt index 6ad269013..5a152f61a 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA958AC8E6AE778 -Inner product checksum theta = 4163544440909176 -Inner product checksum u = 456C296A75CB61E1 -Inner product checksum mr1 = 3F3BB70A4A2CDB2C -Inner product checksum mr2 = 3EEB5F9888ADF09C -Inner product checksum mr3 = 3EE049E45255EF3E -Inner product checksum mr4 = 3EED67E58C2021B8 +Inner product checksum rho = 3FA509A19CBF114C +Inner product checksum theta = 41610F1BFEB0E6B6 +Inner product checksum u = 45688F5FDBD474EE +Inner product checksum mr1 = 3F35BCF304716E6C +Inner product checksum mr2 = 3EEAFF885F22B408 +Inner product checksum mr3 = 3EE049CB62D7CD5C +Inner product checksum mr4 = 3EED5E036E5CC8B3 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt index 0d5740092..9331aab13 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3D4ACA0E -Inner product checksum theta = 4B1AA0CD -Inner product checksum u = 6B614976 -Inner product checksum mr1 = 39DDB942 -Inner product checksum mr2 = 375B1238 -Inner product checksum mr3 = 3702521F -Inner product checksum mr4 = 376B4EC3 +Inner product checksum rho = 3D284C91 +Inner product checksum theta = 4B087777 +Inner product checksum u = 6B4478FE +Inner product checksum mr1 = 39ADE81E +Inner product checksum mr2 = 375811AE +Inner product checksum mr3 = 37025154 +Inner product checksum mr4 = 376AFFAE Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt index 6ad269013..5a152f61a 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_full-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA958AC8E6AE778 -Inner product checksum theta = 4163544440909176 -Inner product checksum u = 456C296A75CB61E1 -Inner product checksum mr1 = 3F3BB70A4A2CDB2C -Inner product checksum mr2 = 3EEB5F9888ADF09C -Inner product checksum mr3 = 3EE049E45255EF3E -Inner product checksum mr4 = 3EED67E58C2021B8 +Inner product checksum rho = 3FA509A19CBF114C +Inner product checksum theta = 41610F1BFEB0E6B6 +Inner product checksum u = 45688F5FDBD474EE +Inner product checksum mr1 = 3F35BCF304716E6C +Inner product checksum mr2 = 3EEAFF885F22B408 +Inner product checksum mr3 = 3EE049CB62D7CD5C +Inner product checksum mr4 = 3EED5E036E5CC8B3 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit.txt index e39902b67..b0bf5b685 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-32bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3D4AC94B -Inner product checksum theta = 4B1A9FE4 -Inner product checksum u = 6B614810 -Inner product checksum mr1 = 39DDBAE6 -Inner product checksum mr2 = 375AFBC4 -Inner product checksum mr3 = 37024CDA -Inner product checksum mr4 = 376B50CC +Inner product checksum rho = 3D284D10 +Inner product checksum theta = 4B08771E +Inner product checksum u = 6B447876 +Inner product checksum mr1 = 39ADE4E0 +Inner product checksum mr2 = 3757FB62 +Inner product checksum mr3 = 37024C1A +Inner product checksum mr4 = 376B018E Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit.txt index 442a9e8b4..7423a529e 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9-C12_MG_ex1a_gnu_production-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 3FA958AD22C5E4CF -Inner product checksum theta = 416354444CB6F160 -Inner product checksum u = 456C2968836163B2 -Inner product checksum mr1 = 3F3BB70B6EC04199 -Inner product checksum mr2 = 3EEB5F9879A11556 -Inner product checksum mr3 = 3EE049E44592FB4D -Inner product checksum mr4 = 3EED67E59E7144E7 +Inner product checksum rho = 3FA5099CDBEA12B4 +Inner product checksum theta = 41610F1BEE6C742F +Inner product checksum u = 45688F5FC27D3983 +Inner product checksum mr1 = 3F35BCF575283D30 +Inner product checksum mr2 = 3EEAFF88D19CC1C6 +Inner product checksum mr3 = 3EE049CB6313FA43 +Inner product checksum mr4 = 3EED5E03BABE1564 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit.txt index a311bce1d..dc566e6c9 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 40C231C0161316BD -Inner product checksum theta = 43076F9C97F79AE5 -Inner product checksum u = 4697A0E8F3CD0B5C -Inner product checksum mr1 = 40A1E79829B25F82 -Inner product checksum mr2 = 4069A4088E1A7842 -Inner product checksum mr3 = 4069ABB4FA005079 -Inner product checksum mr4 = 406986D0FD2D0E7A +Inner product checksum rho = 40AFD0F3325D1D83 +Inner product checksum theta = 43076FC470DF7DDF +Inner product checksum u = 4697A257F73F2A4A +Inner product checksum mr1 = 4087B978405AA662 +Inner product checksum mr2 = 406997D34B3FE4CE +Inner product checksum mr3 = 4069A875F075892B +Inner product checksum mr4 = 406986D990BEDA55 Inner product checksum mr5 = 406997D0C9B8EEFC Inner product checksum mr6 = 40699547929283AD diff --git a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit.txt index 3906107bd..f3118f740 100644 --- a/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/linear_model/ex1a/checksum_linear_model_semi-implicit-C12_ex1a_gnu_fast-debug-64bit.txt @@ -1,3 +1,3 @@ -Inner product checksum rho = 3EED280BC779365A -Inner product checksum theta = 4012F415A1A375AE -Inner product checksum u = 43A4936A5FD4C67B +Inner product checksum rho = 3EED280BC7788E7C +Inner product checksum theta = 4012F415A1A479C3 +Inner product checksum u = 43A4936A5FDBA963 diff --git a/rose-stem/site/nci/common/suite_config_gadi.cylc b/rose-stem/site/nci/common/suite_config_gadi.cylc index adf8a4fe0..d921dc62d 100644 --- a/rose-stem/site/nci/common/suite_config_gadi.cylc +++ b/rose-stem/site/nci/common/suite_config_gadi.cylc @@ -1,8 +1,14 @@ -{% set gadi_base = 'module load /g/data/access/ngm/modules/envs/lfric/202510/oneapi-openmpi' %} +{% set gadi_base = 'module load /g/data/access/ngm/modules/envs/lfric/202603/oneapi-openmpi' %} {% set gadi_base_coupled = 'module load /g/data/access/ngm/modules/envs/lfric-coupled/202511/oneapi-openmpi' %} {% set gadi_plot = 'module load /g/data/access/ngm/modules/analysis3/21.10' %} +[scheduler] + [[events]] + # Load newer python to run handlers + shutdown handlers = "module load /g/data/access/ngm/modules/envs/lfric/202603/oneapi-openmpi; envrun suite_report_git.py -S $CYLC_WORKFLOW_RUN_DIR" + stall handlers = "module load /g/data/access/ngm/modules/envs/lfric/202603/oneapi-openmpi; envrun suite_report_git.py -S $CYLC_WORKFLOW_RUN_DIR" + [runtime] [[GADI_BASE]] platform=gadi @@ -79,12 +85,17 @@ [[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' PLATFORM_SYNC = false + [[export-source]] + pre-script=""" + module load python3/3.12.1 + module load python3-as-python + """ + [[GADI_SCRIPTS]] inherit=GADI_BASE diff --git a/rose-stem/site/uoe/common/default_directives.cylc b/rose-stem/site/uoe/common/default_directives.cylc index b7242f30f..f595a0f8b 100644 --- a/rose-stem/site/uoe/common/default_directives.cylc +++ b/rose-stem/site/uoe/common/default_directives.cylc @@ -23,6 +23,9 @@ "tech-tests_memory": [1, "GB"], "tech-tests_cpus": 1, }, + "lfric_atm": { + "wallclock": 39, + }, }, "epic": { "memory": [50, "GB"], @@ -41,8 +44,11 @@ "tech-tests_memory": [6, "GB"], "tech-tests_cpus": 1, }, + "lfric_atm": { + "wallclock": 39, + }, }, }) %} -{% do LOG.debug("Finished in site/meto/common/default_directives.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in site/meto/common/default_directives.cylc") %} diff --git a/science/adjoint/patches/kernel/atl_kinetic_energy_gradient_kernel_mod.patch b/science/adjoint/patches/kernel/atl_kinetic_energy_gradient_kernel_mod.patch index c82ba1b0d..78961208c 100644 --- a/science/adjoint/patches/kernel/atl_kinetic_energy_gradient_kernel_mod.patch +++ b/science/adjoint/patches/kernel/atl_kinetic_energy_gradient_kernel_mod.patch @@ -1,18 +1,19 @@ -@@ -1,11 +1,11 @@ +@@ -1,4 +1,4 @@ -module adj_kinetic_energy_gradient_kernel_mod +module atl_kinetic_energy_gradient_kernel_mod use argument_mod, only : any_discontinuous_space_3, any_space_9, arg_type, cell_column, func_type, gh_basis, gh_diff_basis, & &gh_field, gh_inc, gh_quadrature_xyoz, gh_read, gh_real use constants_mod, only : i_def, r_def - use fs_continuity_mod, only : w2 - use kernel_mod, only : kernel_type +@@ -8,7 +8,7 @@ + use finite_element_config_mod, only : coord_system + use planet_config_mod, only : scaled_radius implicit none - type, public, extends(kernel_type) :: adj_kinetic_energy_gradient_kernel_type + type, public, extends(kernel_type) :: atl_kinetic_energy_gradient_kernel_type type(ARG_TYPE) :: META_ARGS(5) = (/ & arg_type(gh_field, gh_real, gh_read, w2), & arg_type(gh_field, gh_real, gh_inc, w2), & -@@ -18,15 +18,15 @@ +@@ -21,15 +21,15 @@ INTEGER :: GH_SHAPE = gh_quadrature_xyoz INTEGER :: OPERATES_ON = cell_column CONTAINS @@ -32,7 +33,7 @@ &w2_basis, w2_diff_basis, ndf_chi, undf_chi, map_chi, chi_basis, chi_diff_basis, ndf_pid, undf_pid, map_pid, nqp_h, nqp_v, wqp_h, & &wqp_v) use sci_coordinate_jacobian_mod, only : coordinate_jacobian -@@ -75,7 +75,6 @@ +@@ -78,7 +78,6 @@ real(kind=r_def) :: dv real(kind=r_def), dimension(3) :: mul1 real(kind=r_def), dimension(3) :: mul2 @@ -40,7 +41,7 @@ real(kind=r_def) :: res_dot_product integer :: idx integer :: idx_1 -@@ -153,6 +152,6 @@ +@@ -156,6 +155,6 @@ enddo enddo diff --git a/science/adjoint/patches/kernel/atl_project_eos_pressure_kernel_mod.patch b/science/adjoint/patches/kernel/atl_project_eos_pressure_kernel_mod.patch index b4564ee1a..85bcc5536 100644 --- a/science/adjoint/patches/kernel/atl_project_eos_pressure_kernel_mod.patch +++ b/science/adjoint/patches/kernel/atl_project_eos_pressure_kernel_mod.patch @@ -1,19 +1,22 @@ -@@ -1,11 +1,12 @@ +@@ -1,4 +1,4 @@ -module adj_project_eos_pressure_kernel_mod +module atl_project_eos_pressure_kernel_mod use argument_mod, only : any_discontinuous_space_3, any_space_2, arg_type, cell_column, func_type, gh_basis, gh_diff_basis, & &gh_field, gh_operator, gh_quadrature_xyoz, gh_read, gh_readwrite, gh_real, gh_write use constants_mod, only : i_def, r_def - use fs_continuity_mod, only : w3, wtheta +@@ -6,9 +6,9 @@ use kernel_mod, only : kernel_type -+ use planet_config_mod, only : kappa, rd, p_zero + use base_mesh_config_mod, only : geometry, topology + use finite_element_config_mod, only : coord_system +- use planet_config_mod, only : scaled_radius ++ use planet_config_mod, only : scaled_radius, kappa, rd, p_zero implicit none - type, public, extends(kernel_type) :: adj_project_eos_pressure_kernel_type + type, public, extends(kernel_type) :: atl_project_eos_pressure_kernel_type type(ARG_TYPE) :: META_ARGS(10) = (/ & arg_type(gh_field, gh_real, gh_readwrite, w3), & arg_type(gh_field, gh_real, gh_readwrite, w3), & -@@ -24,15 +25,15 @@ +@@ -27,15 +27,15 @@ INTEGER :: GH_SHAPE = gh_quadrature_xyoz INTEGER :: OPERATES_ON = cell_column CONTAINS @@ -33,7 +36,7 @@ &chi1, chi2, chi3, panel_id, ncell_3d, m3_inv, ndf_w3, undf_w3, map_w3, w3_basis, ndf_wt, undf_wt, map_wt, wt_basis, ndf_chi, & &undf_chi, map_chi, chi_basis, chi_diff_basis, ndf_pid, undf_pid, map_pid, nqp_h, nqp_v, wqp_h, wqp_v) use sci_coordinate_jacobian_mod, only : coordinate_jacobian -@@ -96,9 +97,6 @@ +@@ -99,9 +99,6 @@ real(kind=r_def) :: ls_theta_vd_at_quad real(kind=r_def) :: tmp_ls_exner real(kind=r_def) :: tmp_exner @@ -43,7 +46,7 @@ exner_e = 0.0_r_def exner_at_quad = 0.0_r_def -@@ -176,6 +174,6 @@ +@@ -179,6 +176,6 @@ enddo enddo diff --git a/science/adjoint/patches/kernel/atl_rhs_project_eos_kernel_mod.patch b/science/adjoint/patches/kernel/atl_rhs_project_eos_kernel_mod.patch index 9707453f6..a8d455937 100644 --- a/science/adjoint/patches/kernel/atl_rhs_project_eos_kernel_mod.patch +++ b/science/adjoint/patches/kernel/atl_rhs_project_eos_kernel_mod.patch @@ -1,18 +1,19 @@ -@@ -1,11 +1,11 @@ +@@ -1,4 +1,4 @@ -module adj_rhs_project_eos_kernel_mod +module atl_rhs_project_eos_kernel_mod use argument_mod, only : any_discontinuous_space_3, any_space_9, arg_type, cell_column, func_type, gh_basis, gh_diff_basis, & &gh_field, gh_quadrature_xyoz, gh_read, gh_readwrite, gh_real, gh_scalar, gh_write use constants_mod, only : i_def, r_def - use fs_continuity_mod, only : w3, wtheta - use kernel_mod, only : kernel_type +@@ -8,7 +8,7 @@ + use finite_element_config_mod, only : coord_system + use planet_config_mod, only : scaled_radius implicit none - type, public, extends(kernel_type) :: adj_rhs_project_eos_kernel_type + type, public, extends(kernel_type) :: atl_rhs_project_eos_kernel_type type(ARG_TYPE) :: META_ARGS(14) = (/ & arg_type(gh_field, gh_real, gh_readwrite, w3), & arg_type(gh_field, gh_real, gh_readwrite, w3), & -@@ -28,15 +28,15 @@ +@@ -31,15 +31,15 @@ INTEGER :: GH_SHAPE = gh_quadrature_xyoz INTEGER :: OPERATES_ON = cell_column CONTAINS @@ -31,8 +32,8 @@ + subroutine atl_rhs_project_eos_code(nlayers, rhs_eos, exner, rho, theta, moist_dyn_gas, ls_exner, ls_rho, ls_theta, & &ls_moist_dyn_gas, chi1, chi2, chi3, panel_id, kappa, rd, p_zero, ndf_w3, undf_w3, map_w3, w3_basis, ndf_wt, undf_wt, map_wt, & &wt_basis, ndf_chi, undf_chi, map_chi, chi_basis, chi_diff_basis, ndf_pid, undf_pid, map_pid, nqp_h, nqp_v, wqp_h, wqp_v) - use coordinate_jacobian_mod, only : coordinate_jacobian -@@ -176,6 +176,6 @@ + use sci_coordinate_jacobian_mod, only : coordinate_jacobian +@@ -179,6 +179,6 @@ enddo enddo diff --git a/science/adjoint/patches/kernel/atl_vorticity_advection_kernel_mod.patch b/science/adjoint/patches/kernel/atl_vorticity_advection_kernel_mod.patch index 2e526c9d8..20441d4ed 100644 --- a/science/adjoint/patches/kernel/atl_vorticity_advection_kernel_mod.patch +++ b/science/adjoint/patches/kernel/atl_vorticity_advection_kernel_mod.patch @@ -1,4 +1,4 @@ -@@ -1,34 +1,34 @@ +@@ -1,37 +1,37 @@ -module adj_vorticity_advection_kernel_mod +module atl_vorticity_advection_kernel_mod use kernel_mod, only : kernel_type @@ -8,6 +8,9 @@ - use fs_continuity_mod, only : w1, w2, wchi + use fs_continuity_mod, only : w1, w2 use cross_product_mod, only : cross_product + use base_mesh_config_mod, only : geometry, topology + use finite_element_config_mod, only : coord_system + use planet_config_mod, only : scaled_radius implicit none - type, public, extends(kernel_type) :: adj_vorticity_advection_kernel_type + type, public, extends(kernel_type) :: atl_vorticity_advection_kernel_type @@ -41,7 +44,7 @@ &ndf_w2, undf_w2, map_w2, w2_basis, ndf_w1, undf_w1, map_w1, w1_basis, ndf_chi, undf_chi, map_chi, chi_basis, chi_diff_basis, & &ndf_pid, undf_pid, map_pid, nqp_h, nqp_v, wqp_h, wqp_v) use sci_coordinate_jacobian_mod, only : pointwise_coordinate_jacobian, pointwise_coordinate_jacobian_inverse -@@ -86,7 +86,6 @@ +@@ -89,7 +89,6 @@ real(kind=r_def), dimension(3) :: mul2 real(kind=r_def), dimension(3) :: cross_product1 real(kind=r_def), dimension(3) :: cross_product2 @@ -49,7 +52,7 @@ real(kind=r_def) :: res_dot_product integer :: idx integer :: idx_1 -@@ -207,6 +206,6 @@ +@@ -210,6 +209,6 @@ enddo enddo diff --git a/science/adjoint/rose-meta/lfric-adjoint/version30_31.py b/science/adjoint/rose-meta/lfric-adjoint/version30_31.py new file mode 100644 index 000000000..b6f447ed7 --- /dev/null +++ b/science/adjoint/rose-meta/lfric-adjoint/version30_31.py @@ -0,0 +1,282 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t108(MacroUpgrade): + """Upgrade macro for ticket #108 by Christine Johnson.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.0_t108" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + fixed_ls = self.get_setting_value( + config, ["namelist:linear", "fixed_ls"] + ) + if ".true." in fixed_ls: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".true." + ) + else: + self.add_setting( + config, ["namelist:linear", "transport_efficiency"], ".false." + ) + return config, self.reports + + +class vn30_t182(MacroUpgrade): + """Upgrade macro for ticket #182 by Tom Hill.""" + + BEFORE_TAG = "vn3.0_t108" + AFTER_TAG = "vn3.0_t182" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-linear + """Add linear boundary layer physics scheme""" + scaling = self.get_setting_value( + config, ["namelist:planet", "scaling_factor"] + ) + if "125.0" in scaling: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".false.", + ) + else: + self.add_setting( + config, + ["namelist:linear_physics", "l_boundary_layer"], + ".true.", + ) + self.add_setting( + config, ["namelist:linear_physics", "Blevs_m"], "15" + ) + self.add_setting( + config, ["namelist:linear_physics", "e_folding_levs_m"], "10" + ) + self.add_setting( + config, ["namelist:linear_physics", "l_0_m"], "80.0" + ) + self.add_setting( + config, ["namelist:linear_physics", "log_layer"], "2" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_land_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "u_sea_m"], "0.4" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_land_m"], "0.05" + ) + self.add_setting( + config, ["namelist:linear_physics", "z_sea_m"], "0.0005" + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t182" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/science/adjoint/rose-meta/lfric-adjoint/vn3.1/rose-meta.conf new file mode 100644 index 000000000..a95b2cf2e --- /dev/null +++ b/science/adjoint/rose-meta/lfric-adjoint/vn3.1/rose-meta.conf @@ -0,0 +1 @@ +import=lfric-linear/vn3.1 diff --git a/science/adjoint/source/algorithm/linear_physics/atl_bdy_lyr_alg.x90 b/science/adjoint/source/algorithm/linear_physics/atl_bdy_lyr_alg.x90 new file mode 100644 index 000000000..148ce790f --- /dev/null +++ b/science/adjoint/source/algorithm/linear_physics/atl_bdy_lyr_alg.x90 @@ -0,0 +1,141 @@ +!----------------------------------------------------------------------------- +! (c) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be brief. +!----------------------------------------------------------------------------- +!> @brief (Adjoint of) given TL state(igh_u) compute TLM boundary layer increment u_bl_inc +module atl_bdy_lyr_alg_mod + + use constants_mod, only: r_def + use field_collection_mod, only: field_collection_type + use integer_field_mod, only: integer_field_type + use driver_modeldb_mod, only: modeldb_type + use sci_geometric_constants_mod, only: get_height_fe, & + get_face_selector_ew, & + get_face_selector_ns + use sci_fem_constants_mod, only: get_rmultiplicity_fe + use field_mod, only: field_type + use linear_physics_config_mod, only: log_layer, & + Blevs_m, & + e_folding_levs_m, & + u_land_m, & + u_sea_m, & + z_land_m, & + z_sea_m, & + L_0_m + use derived_config_mod, only: bundle_size + use field_indices_mod, only: igh_d + use timing_mod, only: start_timing, stop_timing, tik, LPROF + use mesh_mod, only: mesh_type + use fs_continuity_mod, only: W2, W3, Wtheta + use tl_compute_qe_kernel_mod, only: tl_compute_qe_kernel_type + use tl_compute_aubu_kernel_mod, only: tl_compute_aubu_kernel_type + use atl_bl_inc_kernel_mod, only: atl_bl_inc_kernel_type + + implicit none + + private + public :: atl_bdy_lyr_alg + +contains + +!> @brief (Adjoint of) given TL state(igh_u) compute TLM boundary layer increment u_bl_inc +!> @details The stages are: +!> 1. Call tl_compute_qe_kernel_type: from LS, compute coefficients Q, E +!> 2. Call tl_compute_aubu_kernel_type: from Q,E, compute coefficients Auv, Buv_inv +!> 3. Call atl_bl_inc_kernel_type: (adjoint of) from state(igh_u) use coefficients Auv, Buv_inv to compute u_bl_inc +!> The TLM BL scheme is described in Var Scientific Documentation Paper 55, +!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf +!> The original code is at https://wwwspice/~frva/VAR/view/var-2022.12.2/doc/PF_bdy_lyr.html +!> @param[in,out] modeldb Structure containing the model state +!> @param[in,out] u_bl_inc TLM boundary layer increment +!> @param[in,out] u The current TL model prognostic u field, state(igh_u) +!> @param[in] ls_state Lin state for Prognostic model state +!> @param[in] dt The TL model timestep length +subroutine atl_bdy_lyr_alg(modeldb, u_bl_inc, u, ls_state, dt) + + implicit none + + type(modeldb_type), target, intent(inout) :: modeldb + type(field_type), intent(inout) :: u_bl_inc + type(field_type), intent(inout) :: u + type(field_type), target, intent(in) :: ls_state(bundle_size) + real(kind=r_def), intent(in) :: dt + + type(mesh_type), pointer :: mesh + type(field_type), pointer :: height_w2 + type(field_type), pointer :: height_w3 + type(field_type), pointer :: height_wth + type(field_type), pointer :: w2_rmultiplicity + type(integer_field_type), pointer :: face_selector_ew + type(integer_field_type), pointer :: face_selector_ns + + type(field_collection_type), pointer :: ls_fields + type(field_type), pointer :: ls_land_fraction + + ! Coefficients computed from linearisation state + type(field_type) :: Q + type(field_type) :: E + type(field_type) :: auv + type(field_type) :: buv_inv + + integer(kind=tik) :: id + + if (LPROF) call start_timing(id, 'atl_bdy_lyr_alg') + + ls_fields => modeldb%fields%get_field_collection('ls_fields') + call ls_fields%get_field('ls_land_fraction', ls_land_fraction) + + mesh => u%get_mesh() + height_w2 => get_height_fe(W2, mesh%get_id()) + height_w3 => get_height_fe(W3, mesh%get_id()) + height_wth => get_height_fe(Wtheta, mesh%get_id()) + + w2_rmultiplicity => get_rmultiplicity_fe(W2, mesh%get_id()) + + face_selector_ew => get_face_selector_ew(mesh%get_id()) + face_selector_ns => get_face_selector_ns(mesh%get_id()) + + call ls_state(igh_d)%copy_field_properties(Q) + call ls_state(igh_d)%copy_field_properties(E) + + call u%copy_field_properties(auv) + call u%copy_field_properties(buv_inv) + + call invoke(tl_compute_qe_kernel_type(Q, & + E, & + ls_state(igh_d), & + height_w3, & + height_wth, & + ls_land_fraction, & + log_layer, & + Blevs_m, & + e_folding_levs_m, & + u_land_m, & + u_sea_m, & + z_land_m, & + z_sea_m, & + L_0_m)) + + call invoke(tl_compute_aubu_kernel_type(auv, & + buv_inv, & + Q, & + E, & + height_w2, & + w2_rmultiplicity, & + dt, & + Blevs_m)) + + call invoke(atl_bl_inc_kernel_type(u_bl_inc, & + u, & + auv, & + buv_inv, & + face_selector_ew, & + face_selector_ns, & + Blevs_m)) + + if (LPROF) call stop_timing(id, 'atl_bdy_lyr_alg') + +end subroutine atl_bdy_lyr_alg + +end module atl_bdy_lyr_alg_mod diff --git a/science/adjoint/source/algorithm/linear_physics/atl_physics_alg.x90 b/science/adjoint/source/algorithm/linear_physics/atl_physics_alg.x90 new file mode 100644 index 000000000..5f93c8940 --- /dev/null +++ b/science/adjoint/source/algorithm/linear_physics/atl_physics_alg.x90 @@ -0,0 +1,148 @@ +!----------------------------------------------------------------------------- +! (c) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be brief. +!----------------------------------------------------------------------------- +!> @brief Wrapper for adjoint physics code +module atl_physics_alg_mod + + use constants_mod, only: r_def + use driver_modeldb_mod, only: modeldb_type + use field_mod, only: field_type + use derived_config_mod, only: bundle_size + use field_indices_mod, only: igh_u + use timing_mod, only: start_timing, stop_timing, tik, LPROF + use mesh_mod, only: mesh_type + use fs_continuity_mod, only: W2 + use sci_geometric_constants_mod, only: get_da_at_w2 + use sci_fem_constants_mod, only: get_mass_matrix_fe + use sci_enforce_bc_kernel_mod, only: enforce_bc_kernel_type + use adj_matrix_vector_kernel_mod, only: adj_matrix_vector_kernel_type + use atl_bdy_lyr_alg_mod, only: atl_bdy_lyr_alg + use sci_mass_matrix_solver_alg_mod, only: mass_matrix_solver_alg + use sci_field_bundle_builtins_mod, only: clone_bundle, copy_bundle, set_bundle_scalar + use operator_mod, only: operator_type + + implicit none + + private + public :: atl_physics_alg + +contains + +!> @brief Wrapper for adjoint physics code, currently just atl_bdy_lyr_alg +!> @param[in,out] modeldb Structure containing the model state +!> @param[in,out] u The TL model u field to be incremented +!> @param[in,out] state_star TL model prognostic fields for physics calculations +!> @param[in,out] rhs_phys Residuals +!> @param[in] state The current TL model prognostic fields +!> @param[in] rhs_n Residuals +!> @param[in] rhs_np1 Residuals +!> @param[in] rhs_adv Advective terms +!> @param[in] ls_state Lin state for Prognostic model state +!> @param[in] mesh The current mesh +!> @param[in] dt The TL model timestep length +subroutine atl_physics_alg(modeldb, & + u, & + state_star, & + rhs_phys, & + rhs_np1, & + rhs_n, & + state, & + rhs_adv, & + ls_state, & + mesh, & + dt) + + implicit none + + type(modeldb_type), target, intent(inout) :: modeldb + type(field_type), intent(inout) :: u + type(field_type), intent(inout) :: state_star(bundle_size) + type(field_type), intent(inout) :: rhs_phys(bundle_size) + type(field_type), intent(in) :: state(bundle_size) + type(field_type), intent(in) :: rhs_n(bundle_size) + type(field_type), intent(in) :: rhs_np1(bundle_size) + type(field_type), intent(in) :: rhs_adv(bundle_size) + type(field_type), intent(in) :: ls_state(bundle_size) + type(mesh_type), pointer, intent(in) :: mesh + real(kind=r_def), intent(in) :: dt + + type(field_type) :: u_bl_inc + type(field_type) :: u_bl_inc_flux + type(field_type) :: du + type(field_type) :: u_star + type(field_type) :: u_star_physical + type(field_type) :: rhsu_np1 + + type(operator_type), pointer :: mm_vel + type(field_type), pointer :: dA + + integer(kind=tik) :: id + + if (LPROF) call start_timing(id, 'atl_physics_alg') + + mm_vel => get_mass_matrix_fe(W2, mesh%get_id()) + + call u%copy_field_properties( u_bl_inc ) + call u%copy_field_properties( u_bl_inc_flux ) + call u%copy_field_properties( du ) + call u%copy_field_properties( u_star ) + call u%copy_field_properties( u_star_physical ) + call rhs_adv(igh_u)%copy_field_properties( rhsu_np1 ) + + call du%initialise( rhs_adv(igh_u)%get_function_space() ) + call rhsu_np1%initialise( rhs_adv(igh_u)%get_function_space() ) + + call clone_bundle( state, state_star, bundle_size ) + call copy_bundle( state, state_star, bundle_size ) ! Only state_star(igh_u) is used + call set_bundle_scalar( 0.0_r_def, state_star, bundle_size ) + + dA => get_da_at_w2(mesh%get_id()) + + call invoke( setval_c( u_bl_inc_flux, 0.0_r_def ), & + setval_c( u_bl_inc, 0.0_r_def ), & + setval_c( u_star, 0.0_r_def ), & + setval_c( u_star_physical, 0.0_r_def ), & + setval_c( du, 0.0_r_def ), & + setval_c( rhsu_np1, 0.0_r_def ) ) + + call invoke( enforce_bc_kernel_type( rhs_phys(igh_u) ), & + adj_matrix_vector_kernel_type( rhs_phys(igh_u), u_bl_inc_flux, mm_vel ) ) + + call set_bundle_scalar( 0.0_r_def, rhs_phys, bundle_size ) + + ! Adj of u_bl_inc_flux = u_bl_inc * dA + call invoke( inc_x_times_y( u_bl_inc_flux, dA ), & + inc_x_plus_y( u_bl_inc, u_bl_inc_flux ) ) + + call atl_bdy_lyr_alg( modeldb, u_bl_inc, state_star(igh_u), & + ls_state, dt ) + + ! Adj of state_star(igh_u) <- u_star_physical + call invoke( inc_x_plus_y( u_star_physical, state_star(igh_u) ), & + setval_c( state_star(igh_u), 0.0_r_def ) ) + + ! Adj of u_star_physical = u_star / dA + call invoke( inc_x_divideby_y( u_star_physical, dA ), & + inc_x_plus_y( u_star, u_star_physical ) ) + + ! Adj of u_star = du + state(igh_u) + call invoke( inc_X_plus_Y( du, u_star ), & + inc_X_plus_Y( state(igh_u), u_star ) ) + + ! Adj of call mass_matrix_solver_alg(du, rhsu_np1) + call mass_matrix_solver_alg( rhsu_np1, du ) + + ! Adj of inc_X_plus_Y(rhsu_np1, rhs_adv(igh_u)) + call invoke( inc_X_plus_Y( rhs_adv(igh_u), rhsu_np1 ) ) + + ! Adj of rhsu_np1 <- -rhs_np1(igh_u) + rhs_n(igh_u) + call invoke( inc_X_plus_bY( rhs_np1(igh_u), -1.0_r_def, rhsu_np1 ), & + inc_X_plus_Y( rhs_n(igh_u), rhsu_np1 ) ) + + if (LPROF) call stop_timing(id, 'atl_physics_alg') + +end subroutine atl_physics_alg + +end module atl_physics_alg_mod diff --git a/science/adjoint/source/algorithm/lookup/adj_lookup_table_mod.x90 b/science/adjoint/source/algorithm/lookup/adj_lookup_table_mod.x90 index db401b908..81a16804c 100644 --- a/science/adjoint/source/algorithm/lookup/adj_lookup_table_mod.x90 +++ b/science/adjoint/source/algorithm/lookup/adj_lookup_table_mod.x90 @@ -47,9 +47,7 @@ module adj_lookup_table_mod procedure, public :: get_nsets_max procedure, public :: get_nindices procedure, public :: get_ndata - procedure, public :: adj_lookup_table_assign procedure, public :: finalise => adj_lookup_table_finaliser - generic, public :: assignment(=) => adj_lookup_table_assign end type adj_lookup_table_type contains @@ -233,26 +231,6 @@ module adj_lookup_table_mod end function get_ndata - !============================================================================= - !> @brief Assignment operator. - !> @details Implemented to avoid pointer aliasing preventing compiler optimisations. - subroutine adj_lookup_table_assign(dest, source) - - implicit none - - class(adj_lookup_table_type), intent(in) :: source - class(adj_lookup_table_type), intent(out) :: dest - - call source%lookup_field%copy_field_properties(dest%lookup_field) - call source%set_count_field%copy_field_properties(dest%set_count_field) - call invoke( int_setval_X(dest%lookup_field, source%lookup_field), & - int_setval_X(dest%set_count_field, source%set_count_field) ) - dest%nsets_max = source%nsets_max - dest%nindices = source%nindices - dest%ndata = source%ndata - - end subroutine adj_lookup_table_assign - !============================================================================= !> @brief Destructor. !> @param [in,out] self Lookup table diff --git a/science/adjoint/source/algorithm/lookup/solver/adj_solver_lookup_cache_mod.x90 b/science/adjoint/source/algorithm/lookup/solver/adj_solver_lookup_cache_mod.x90 index dc52a9740..e0aa2d9fa 100644 --- a/science/adjoint/source/algorithm/lookup/solver/adj_solver_lookup_cache_mod.x90 +++ b/science/adjoint/source/algorithm/lookup/solver/adj_solver_lookup_cache_mod.x90 @@ -34,9 +34,7 @@ module adj_solver_lookup_cache_mod procedure, public :: initialise => adj_solver_lookup_cache_init procedure, public :: get_lookup_apply_hho - procedure, public :: adj_solver_lookup_cache_assign procedure, public :: finalise => adj_solver_lookup_cache_final - generic, public :: assignment(=) => adj_solver_lookup_cache_assign end type adj_solver_lookup_cache_type @@ -66,7 +64,7 @@ module adj_solver_lookup_cache_mod ! Arguments class(adj_solver_lookup_cache_type), intent(inout) :: self - type(mesh_type), pointer, intent(in) :: mesh + type(mesh_type), pointer, intent(in) :: mesh ! Internal variables type(function_space_type), pointer :: vector_space_w3_ptr @@ -87,18 +85,19 @@ module adj_solver_lookup_cache_mod else self%multigrid_levels=1 end if - allocate(self%lookup_apply_hho(self%multigrid_levels)) + ! Extra level needed for coarse operator + allocate(self%lookup_apply_hho(self%multigrid_levels + 1)) if (l_multigrid) then call multigrid_function_space_chain%set_current(vector_space_w3_ptr%get_id()) end if - do level = 1, self%multigrid_levels + do level = 1, self%multigrid_levels + 1 call vector_x%initialise(vector_space_w3_ptr) call invoke(setval_c(vector_x, 0.0_r_solver)) call create_lookup_apply_helmholtz_op(self%lookup_apply_hho(level), & vector_x) - if(l_multigrid) then + if((l_multigrid) .and. (level < self%multigrid_levels)) then vector_space_w3_ptr => multigrid_function_space_chain%get_next() end if end do @@ -122,41 +121,22 @@ module adj_solver_lookup_cache_mod ! Arguments class(adj_solver_lookup_cache_type), target, intent(in) :: self - integer(kind=i_def), intent(in) :: level + integer(kind=i_def), intent(in) :: level ! Returns - type(adj_lookup_table_type), pointer :: lookup_ptr + type(adj_lookup_table_type), pointer :: lookup_ptr if (.not. self%is_initialised) call log_event("Cannot get lookup: cache is not initialised", LOG_LEVEL_ERROR) + if ((level < 1) .and. (level > self%multigrid_levels + 1)) then + write(log_scratch_space,*) "get_lookup_apply_hho: Requested level must be between 1 and ", & + self%multigrid_levels + 1, "but level = ", level + call log_event(log_scratch_space, LOG_LEVEL_ERROR) + end if nullify(lookup_ptr) lookup_ptr => self%lookup_apply_hho(level) end function get_lookup_apply_hho - !============================================================================= - !> @brief Assignment operator. - !> @details Implemented to avoid pointer aliasing preventing compiler optimisations. - subroutine adj_solver_lookup_cache_assign(dest, source) - - implicit none - - class(adj_solver_lookup_cache_type), intent(in) :: source - class(adj_solver_lookup_cache_type), intent(out) :: dest - - ! Internal variables - integer(kind=i_def) :: level - - if (.not. source%is_initialised) call log_event("Source cache in copy assignment is not initialised", LOG_LEVEL_ERROR) - - dest%multigrid_levels = source%multigrid_levels - allocate(dest%lookup_apply_hho(dest%multigrid_levels)) - do level = 1_i_def, source%multigrid_levels - dest%lookup_apply_hho(level) = source%lookup_apply_hho(level) - end do - dest%is_initialised = .true._l_def - - end subroutine adj_solver_lookup_cache_assign - !============================================================================= !> @brief Destructor. !> @param [in,out] self Lookup table cache @@ -171,7 +151,7 @@ module adj_solver_lookup_cache_mod integer(kind=i_def) :: level if (self%is_initialised) then - do level = 1, self%multigrid_levels + do level = 1, self%multigrid_levels + 1 call self%lookup_apply_hho(level)%finalise() end do if (allocated(self%lookup_apply_hho)) deallocate(self%lookup_apply_hho) diff --git a/science/adjoint/source/algorithm/lookup/transport/adj_trans_lookup_cache_mod.x90 b/science/adjoint/source/algorithm/lookup/transport/adj_trans_lookup_cache_mod.x90 index 4b5687b78..292671ca9 100644 --- a/science/adjoint/source/algorithm/lookup/transport/adj_trans_lookup_cache_mod.x90 +++ b/science/adjoint/source/algorithm/lookup/transport/adj_trans_lookup_cache_mod.x90 @@ -9,7 +9,8 @@ module adj_trans_lookup_cache_mod use adj_lookup_table_mod, only: adj_lookup_table_type use constants_mod, only: i_def, l_def - use fs_continuity_mod, only: W3, Wtheta + use fs_continuity_mod, only: W3, Wtheta, & + W2, W2H use log_mod, only: log_event, & log_scratch_space, & LOG_LEVEL_ERROR @@ -33,11 +34,15 @@ module adj_trans_lookup_cache_mod type(adj_lookup_table_type) :: lookup_poly_adv_upd !> Lookup table for adj_w3h_advective_update_kernel. - type(adj_lookup_table_type) :: lookup_w3h_adv_upd + !> First index is on W2, second on W2H. + type(adj_lookup_table_type), allocatable, dimension(:) :: lookup_w3h_adv_upd !> Number of function spaces for lookup_poly2d. integer(kind=i_def) :: n_fs_poly2d + !> Number of function spaces for lookup_w3h_adv_upd. + integer(kind=i_def) :: n_fs_w3h_adv_upd + !> Flag to state whether or not cache is initialised logical(kind=l_def) :: is_initialised = .false._l_def @@ -67,7 +72,6 @@ module adj_trans_lookup_cache_mod use constants_mod, only: r_tran use finite_element_config_mod, only: element_order_h, & element_order_v - use fs_continuity_mod, only: W2, W2H use function_space_mod, only: function_space_type use function_space_collection_mod, only: function_space_collection use mesh_mod, only: mesh_type @@ -225,32 +229,42 @@ module adj_trans_lookup_cache_mod ! ========================================================================= ! Creating lookup_w3h_adv_upd ! ========================================================================= + self%n_fs_w3h_adv_upd = 2_i_def + allocate(self%lookup_w3h_adv_upd(self%n_fs_w3h_adv_upd)) m3_inv => get_inverse_mass_matrix_fe(W3, mesh_id) ndata = 6_i_def - vector_space_w3_md_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, W3, ndata, ndata_first=.false. & - ) - vector_space_w3_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, W3 & - ) - vector_space_w2_ptr => function_space_collection%get_fs( & - mesh, element_order_h, element_order_v, W2 & - ) + do fspace_iterator = 1_i_def, self%n_fs_w3h_adv_upd + if (fspace_iterator == 1_i_def) then + fspace_enum = W2 + else + fspace_enum = W2H + end if - call advective%initialise(vector_space=vector_space_w3_ptr, name='advective') - call tracer%initialise(vector_space=vector_space_w3_md_ptr, name='tracer') - call wind%initialise(vector_space=vector_space_w2_ptr, name='wind') + vector_space_w3_md_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, W3, ndata, ndata_first=.false. & + ) + vector_space_w3_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, W3 & + ) + vector_space_fs_ptr => function_space_collection%get_fs( & + mesh, element_order_h, element_order_v, fspace_enum & + ) - call invoke(setval_c(advective, 0.0_r_tran), & - setval_c(tracer, 0.0_r_tran), & - setval_c(wind, 0.0_r_tran)) - call create_lookup_w3h_adv_upd(self%lookup_w3h_adv_upd, & - advective, & - tracer, & - wind, & - m3_inv, & - stencil_extent) + call advective%initialise(vector_space=vector_space_w3_ptr, name='advective') + call tracer%initialise(vector_space=vector_space_w3_md_ptr, name='tracer') + call wind%initialise(vector_space=vector_space_fs_ptr, name='wind') + + call invoke(setval_c(advective, 0.0_r_tran), & + setval_c(tracer, 0.0_r_tran), & + setval_c(wind, 0.0_r_tran)) + call create_lookup_w3h_adv_upd(self%lookup_w3h_adv_upd(fspace_iterator), & + advective, & + tracer, & + wind, & + m3_inv, & + stencil_extent) + end do self%is_initialised = .true._l_def @@ -338,20 +352,35 @@ module adj_trans_lookup_cache_mod !============================================================================= !> @brief Return a pointer to the w3h_adv_upd lookup table. !> @param [in] self Lookup table cache + !> @param [in] fspace_enum Function space enumerator !> @return lookup_ptr The lookup table - function get_lookup_w3h_adv_upd(self) result(lookup_ptr) + function get_lookup_w3h_adv_upd(self, fspace_enum) result(lookup_ptr) implicit none ! Arguments class(adj_trans_lookup_cache_type), target, intent(in) :: self + integer(kind=i_def), intent(in) :: fspace_enum + + ! Internal variables + integer(kind=i_def) :: fspace_index ! Returns type(adj_lookup_table_type), pointer :: lookup_ptr if (.not. self%is_initialised) call log_event("Cannot get lookup: cache is not initialised", LOG_LEVEL_ERROR) nullify(lookup_ptr) - lookup_ptr => self%lookup_w3h_adv_upd + fspace_index = 0_i_def + select case(fspace_enum) + case (W2) + fspace_index = 1_i_def + case (W2H) + fspace_index = 2_i_def + case default + write(log_scratch_space, *) "Invalid functionspace chosen for get_lookup_w3h_adv_upd, must be W2 or W2H" + call log_event(log_scratch_space, LOG_LEVEL_ERROR) + end select + lookup_ptr => self%lookup_w3h_adv_upd(fspace_index) end function get_lookup_w3h_adv_upd @@ -374,8 +403,11 @@ module adj_trans_lookup_cache_mod call self%lookup_poly2d(fspace_index)%finalise() end do call self%lookup_poly_adv_upd%finalise() - call self%lookup_w3h_adv_upd%finalise() + do fspace_index = 1_i_def, self%n_fs_w3h_adv_upd + call self%lookup_w3h_adv_upd(fspace_index)%finalise() + end do if (allocated(self%lookup_poly2d)) deallocate(self%lookup_poly2d) + if (allocated(self%lookup_w3h_adv_upd)) deallocate(self%lookup_w3h_adv_upd) end if end subroutine adj_trans_lookup_cache_final diff --git a/science/adjoint/source/algorithm/solver/adj_pressure_operator_alg_mod.x90 b/science/adjoint/source/algorithm/solver/adj_pressure_operator_alg_mod.x90 index 77d04efbf..6fae39423 100644 --- a/science/adjoint/source/algorithm/solver/adj_pressure_operator_alg_mod.x90 +++ b/science/adjoint/source/algorithm/solver/adj_pressure_operator_alg_mod.x90 @@ -19,7 +19,7 @@ module adj_pressure_operator_alg_mod use base_mesh_config_mod, only: topology, topology_non_periodic use invoke_adj_a_h_o_lookup_kernel_mod, only: invoke_adj_a_h_o_lookup_kernel - use adj_lookup_table_generators_alg_mod, only: create_lookup_apply_helmholtz_op + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type use adj_lookup_table_mod, only: adj_lookup_table_type use integer_field_mod, only: integer_field_type @@ -35,7 +35,8 @@ module adj_pressure_operator_alg_mod type, public, extends(abstract_hierarchical_linear_operator_type) :: adj_pressure_operator_type private - integer(kind=i_def) :: level + integer(kind=i_def) :: level + type(adj_solver_lookup_cache_type), pointer :: adj_lookup_table_cache_ptr contains procedure, public :: apply => apply_adj_pressure_operator procedure, private :: apply_adj_pressure_operator @@ -53,18 +54,21 @@ module adj_pressure_operator_alg_mod contains !> @brief Construct new instance of type. - !> @param[in] level The mesh level the space is on - function adj_pressure_operator_constructor(level) result(self) + !> @param[in] level The mesh level the space is on + !> @param[in] adj_lookup_table_cache The lookup table cache + function adj_pressure_operator_constructor(level, adj_lookup_table_cache) result(self) implicit none - integer(kind=i_def), intent(in) :: level - type(adj_pressure_operator_type) :: self + integer(kind=i_def), intent(in) :: level + type(adj_solver_lookup_cache_type), target, intent(in) :: adj_lookup_table_cache + type(adj_pressure_operator_type) :: self call log_event( 'Constructing adjoint pressure_operator...', LOG_LEVEL_DEBUG ) ! Temporaries required in operator application self%level = level + self%adj_lookup_table_cache_ptr => adj_lookup_table_cache call log_event( 'done', LOG_LEVEL_DEBUG ) @@ -82,6 +86,7 @@ contains ! Deep copy of the contents of the adj_pressure_operator_type dest%level = source%level + dest%adj_lookup_table_cache_ptr => source%adj_lookup_table_cache_ptr end subroutine adj_pressure_operator_assign @@ -105,10 +110,10 @@ contains logical(kind=l_def) :: lam_mesh ! Lookup table - type(adj_lookup_table_type) :: lookup - type(integer_field_type), pointer :: lookup_field - type(integer_field_type), pointer :: set_counts_field - integer(kind=i_def) :: nindices + type(adj_lookup_table_type), pointer :: lookup + type(integer_field_type), pointer :: lookup_field + type(integer_field_type), pointer :: set_counts_field + integer(kind=i_def) :: nindices integer(tik) :: id @@ -140,8 +145,7 @@ contains setval_c( y_vec, 0.0_r_solver ) ) ! Run adj_apply_helmholtz_operator kernel. - ! Generate adjoint lookup table for stencil operation. Dry run of the TL code, horizontal only. - call create_lookup_apply_helmholtz_op( lookup, x_vec ) + lookup => self%adj_lookup_table_cache_ptr%get_lookup_apply_hho(self%level) lookup_field => lookup%get_lookup_field() set_counts_field => lookup%get_set_count_field() nindices = lookup%get_nindices() @@ -182,7 +186,7 @@ contains class(abstract_hierarchical_linear_operator_type), allocatable, intent(inout) :: coarse_operator allocate( coarse_operator, & - source = adj_pressure_operator_type(self%level + 1) ) + source = adj_pressure_operator_type(self%level + 1, self%adj_lookup_table_cache_ptr) ) end subroutine coarsen_adj_pressure_operator diff --git a/science/adjoint/source/algorithm/solver/adj_semi_implicit_solver_alg_mod.x90 b/science/adjoint/source/algorithm/solver/adj_semi_implicit_solver_alg_mod.x90 index 93c56ed77..3a1f0ee48 100644 --- a/science/adjoint/source/algorithm/solver/adj_semi_implicit_solver_alg_mod.x90 +++ b/science/adjoint/source/algorithm/solver/adj_semi_implicit_solver_alg_mod.x90 @@ -25,6 +25,7 @@ module adj_semi_implicit_solver_alg_mod use adj_pressure_precon_alg_mod, only: adj_pressure_preconditioner_type use multigrid_preconditioner_alg_mod, only: multigrid_preconditioner_type use pressure_operator_alg_mod, only: pressure_operator_type + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type use adj_pressure_operator_alg_mod, only: adj_pressure_operator_type use sci_null_preconditioner_alg_mod, only: null_preconditioner_type use sci_preconditioner_mod, only: abstract_preconditioner_type @@ -89,9 +90,11 @@ contains !> @details Called by init method of this module, but also by !! adjt_mixed_schur_preconditioner_alg_mod and adjt_mixed_solver_alg_mod !> @param[in] state Prognostic state for the adjoint pressure preconditioner + !> @param[in] adj_lookup_table_cache The lookup table cache !> @param[out] adj_pressure_operator_out Output adjoint (Helmholtz) pressure operator !> @param[out] adj_pressure_preconditioner_out Output adjoint (Helmholtz) pressure preconditioner - subroutine create_adj_pressure_preconditioner( state, adj_pressure_operator_out, adj_pressure_preconditioner_out ) + subroutine create_adj_pressure_preconditioner( state, adj_lookup_table_cache, & + adj_pressure_operator_out, adj_pressure_preconditioner_out ) use helmholtz_solver_config_mod, only: helmholtz_preconditioner => preconditioner, & preconditioner_none, & @@ -102,6 +105,7 @@ contains ! Prognostic fields type(field_type), dimension(bundle_size), intent(in) :: state + type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Output adjoint operator and preconditioner for (Helmholtz) pressure problem type(adj_pressure_operator_type), intent(out) :: adj_pressure_operator_out @@ -110,7 +114,11 @@ contains ! Vertical pressure preconditioner type(adj_pressure_preconditioner_type) :: adj_helmholtz_preconditioner - adj_pressure_operator_out = adj_pressure_operator_type(level=1_i_def) + integer(kind=i_def) :: level + + level = 1_i_def + + adj_pressure_operator_out = adj_pressure_operator_type(level, adj_lookup_table_cache) call log_event( "adj_semi_implicit_solver_type%create_adj_pressure_preconditioner: starting", LOG_LEVEL_INFO ) @@ -256,16 +264,19 @@ contains !> @brief Initialisation procedure for the adjoint semi-implicit solver !> @param[in] state Prognostic state for the solver - subroutine initialise( self, state ) + subroutine initialise( self, state, adj_lookup_table_cache ) implicit none ! Arguments - class(adj_semi_implicit_solver_type), intent(inout) :: self - type(field_type), dimension(bundle_size), intent(in) :: state - - self%adj_pressure_operator = adj_pressure_operator_type(level=1_i_def) - call create_adj_pressure_preconditioner( state, self%adj_pressure_operator, self%adj_pressure_preconditioner ) + class(adj_semi_implicit_solver_type), intent(inout) :: self + type(field_type), dimension(bundle_size), intent(in) :: state + type(adj_solver_lookup_cache_type), intent(in) :: adj_lookup_table_cache + + call create_adj_pressure_preconditioner( state, & + adj_lookup_table_cache, & + self%adj_pressure_operator, & + self%adj_pressure_preconditioner ) call create_adj_pressure_solver( self%adj_pressure_operator, self%adj_pressure_preconditioner, self%adj_pressure_solver ) call create_adj_mixed_preconditioner( state, self%adj_pressure_solver, self%adj_mixed_preconditioner ) call create_adj_mixed_solver( self%adj_mixed_preconditioner, self%adj_mixed_operator, self%adj_mixed_solver ) diff --git a/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 b/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 index 66f9894d6..679e30c38 100644 --- a/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 +++ b/science/adjoint/source/algorithm/timestepping/atl_si_timestep_alg_mod.x90 @@ -24,6 +24,7 @@ module atl_si_timestep_alg_mod l_stabilise_bl, & n_bl_levels_to_stabilise, & max_bl_stabilisation + use linear_physics_config_mod, only: l_boundary_layer use derived_config_mod, only: bundle_size use boundaries_config_mod, only: limited_area use sci_fem_constants_mod, only: get_mass_matrix_fe, get_qr_fe @@ -44,6 +45,8 @@ module atl_si_timestep_alg_mod use rhs_alg_mod, only: rhs_alg use atl_rhs_alg_mod, only: atl_rhs_alg use gungho_transport_control_alg_mod, only: gungho_transport_control_alg + use adj_solver_lookup_cache_mod, only: adj_solver_lookup_cache_type + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use atl_transport_control_alg_mod, only: atl_transport_control_alg use si_operators_alg_mod, only: compute_si_operators use semi_implicit_solver_alg_mod, only: semi_implicit_solver_alg_step @@ -51,6 +54,7 @@ module atl_si_timestep_alg_mod use derive_exner_from_eos_alg_mod, only: derive_exner_from_eos use atl_derive_exner_from_eos_alg_mod, only: atl_derive_exner_from_eos use update_prognostic_scalars_alg_mod, only: update_prognostic_scalars_alg + use atl_physics_alg_mod, only: atl_physics_alg use mr_indices_mod, only: nummr use moist_dyn_mod, only: num_moist_factors, gas_law use field_indices_mod, only: igh_u, igh_t, igh_d, igh_p @@ -75,6 +79,7 @@ module atl_si_timestep_alg_mod type(field_type), allocatable :: state2(:) type(field_type), allocatable :: state_copy(:) type(field_type), allocatable :: state_n(:) + type(field_type), allocatable :: state_star(:) type(field_type), allocatable :: state_after_slow(:) type(field_type), allocatable :: advected_state(:) type(field_type), allocatable :: mr_n(:) @@ -86,6 +91,7 @@ module atl_si_timestep_alg_mod type(field_type), allocatable :: state_test(:) type(field_type), allocatable :: rhs_np1_test(:) type(field_type), allocatable :: rhs_np1_in(:) + type(field_type), allocatable :: rhs_phys(:) ! Linearisation state type(field_type), allocatable :: ls_state(:) @@ -113,6 +119,10 @@ module atl_si_timestep_alg_mod ! Moisture flag logical(l_def) :: use_moisture + ! Adjoint lookup tables + type(adj_solver_lookup_cache_type) :: adj_solver_lookup_cache + type(adj_trans_lookup_cache_type) :: adj_trans_lookup_cache + contains procedure, public :: initialise @@ -173,6 +183,7 @@ contains allocate(self%state_copy(bundle_size)) allocate(self%state_n(bundle_size)) allocate(self%state_after_slow(bundle_size)) + allocate(self%state_star(bundle_size)) allocate(self%advected_state(bundle_size)) allocate(self%rhs_n(bundle_size)) allocate(self%rhs_np1(bundle_size)) @@ -183,6 +194,7 @@ contains allocate(self%state_test(bundle_size)) allocate(self%rhs_np1_test(bundle_size)) allocate(self%rhs_np1_in(bundle_size)) + allocate(self%rhs_phys(bundle_size)) allocate(self%ls_state(bundle_size)) allocate(self%ls_state_n(bundle_size)) @@ -225,6 +237,7 @@ contains call clone_bundle( self%state, self%state_test, bundle_size ) call clone_bundle( self%state, self%rhs_np1_test, bundle_size ) call clone_bundle( self%state, self%rhs_np1_in, bundle_size ) + call clone_bundle( self%state, self%rhs_phys, bundle_size ) call clone_bundle( self%state, self%ls_state, bundle_size ) call clone_bundle( self%state, self%ls_state_n, bundle_size ) @@ -270,7 +283,10 @@ contains call set_bundle_scalar( 0.0_r_def, self%ls_mr_after_slow, nummr ) end if - call self%adj_semi_implicit_solver%initialise(self%state) + call self%adj_solver_lookup_cache%initialise(u%get_mesh()) + call self%adj_trans_lookup_cache%initialise(u%get_mesh()) + + call self%adj_semi_implicit_solver%initialise(self%state, self%adj_solver_lookup_cache) call log_event( "atl_si_timestep_type%init: initialised timestepping algorithm", LOG_LEVEL_INFO ) @@ -555,6 +571,7 @@ contains call set_bundle_scalar( 0.0_r_def, self%state_initial, bundle_size ) call set_bundle_scalar( 0.0_r_def, self%rhs_n, bundle_size ) call set_bundle_scalar( 0.0_r_def, self%rhs_np1, bundle_size ) + call set_bundle_scalar( 0.0_r_def, self%rhs_phys, bundle_size ) call set_bundle_scalar( 0.0_r_def, self%mr_after_slow, nummr ) call set_bundle_scalar( 0.0_r_def, self%mr_n, nummr ) @@ -644,32 +661,73 @@ contains setval_c( self%rhs_np1(igh_t), 0.0_r_def ) ) end if + if (l_boundary_layer) call add_bundle(self%rhs_phys,self%rhs_np1,self%rhs_phys, bundle_size) call add_bundle( self%rhs_adv, self%rhs_np1, self%rhs_adv, bundle_size ) call add_bundle( self%rhs_n, self%rhs_np1, self%rhs_n, bundle_size ) call bundle_ax( -1.0_r_def, self%rhs_np1, self%rhs_np1, bundle_size ) - call set_bundle_scalar( 0.0_r_def,self%state1,bundle_size ) - call set_bundle_scalar( 0.0_r_def,self%state2,bundle_size ) + if (inner > 1) then + + if (use_wavedynamics) then + + call set_bundle_scalar( 0.0_r_def, self%state1, bundle_size ) + call set_bundle_scalar( 0.0_r_def, self%state2, bundle_size ) - call atl_rhs_alg( self%rhs_np1, & - -varalpha*cast_dt, & - self%state1, & - self%state2, & - moist_dyn, & - self%ls_state_itns(:,ls_outer,ls_inner), & - self%ls_moist_dyn_itns(:,ls_outer,ls_inner), & - .true., & - dlayer_on, & - modeldb%clock ) + call atl_rhs_alg( self%rhs_np1, & + -varalpha*cast_dt, & + self%state1, & + self%state2, & + moist_dyn, & + self%ls_state_itns(:,ls_outer,ls_inner), & + self%ls_moist_dyn_itns(:,ls_outer,ls_inner), & + .true., & + dlayer_on, & + modeldb%clock ) - call add_bundle( self%state,self%state2 ,self%state, bundle_size ) - call add_bundle( self%state,self%state1 ,self%state, bundle_size ) + call add_bundle( self%state, self%state2, self%state, bundle_size ) + call add_bundle( self%state, self%state1, self%state, bundle_size ) + + end if + + end if end do inner_dynamics_loop !------------------------------------------------------------------------- ! End of inner (nonlinear, Coriolis) loop !------------------------------------------------------------------------- + if (l_boundary_layer) then + ! Linear boundary layer scheme is currently the only linear physics scheme + call atl_physics_alg( modeldb, & + u, & + self%state_star, & + self%rhs_phys, & + self%rhs_np1, & + self%rhs_n, & + self%state, & + self%rhs_adv, & + self%ls_state_itns(:,ls_outer,1), & + mesh, & + cast_dt ) + end if ! l_boundary_layer + + call set_bundle_scalar( 0.0_r_def, self%state1, bundle_size ) + call set_bundle_scalar( 0.0_r_def, self%state2, bundle_size ) + + call atl_rhs_alg( self%rhs_np1, & + -varalpha*cast_dt, & + self%state1, & + self%state2, & + moist_dyn, & + self%ls_state_itns(:,ls_outer,1), & + self%ls_moist_dyn_itns(:,ls_outer,1), & + .true., & + dlayer_on, & + modeldb%clock ) + + call add_bundle( self%state, self%state2, self%state, bundle_size ) + call add_bundle( self%state, self%state1, self%state, bundle_size ) + call invoke( setval_c( self%theta_fv_inc, 0.0_r_def ), & adj_dg_inc_matrix_vector_kernel_type( self%rhs_adv(igh_t), & self%theta_fv_inc, mm_wt ), & @@ -686,7 +744,8 @@ contains self%ls_state_n(igh_u), & self%ls_mr_after_slow, & modeldb%clock, & - outer ) ! advected_state finished with + outer, & + self%adj_trans_lookup_cache ) ! advected_state finished with end do outer_dynamics_loop !--------------------------------------------------------------------------- @@ -759,6 +818,7 @@ contains if (allocated(self%state_n)) deallocate(self%state_n) if (allocated(self%state_initial)) deallocate(self%state_initial) if (allocated(self%state_after_slow)) deallocate(self%state_after_slow) + if (allocated(self%state_star)) deallocate(self%state_star) if (allocated(self%advected_state)) deallocate(self%advected_state) if (allocated(self%rhs_n)) deallocate(self%rhs_n) if (allocated(self%rhs_np1)) deallocate(self%rhs_np1) @@ -769,6 +829,7 @@ contains if (allocated(self%state_test)) deallocate(self%state_test) if (allocated(self%rhs_np1_test)) deallocate(self%rhs_np1_test) if (allocated(self%rhs_np1_in)) deallocate(self%rhs_np1_in) + if (allocated(self%rhs_phys)) deallocate(self%rhs_phys) if (allocated(self%ls_state)) deallocate(self%ls_state) if (allocated(self%ls_state_itns)) deallocate(self%ls_state_itns) @@ -785,6 +846,9 @@ contains if (allocated(self%ls_mr_itns)) deallocate(self%ls_mr_itns) if (allocated(self%ls_moist_dyn_itns)) deallocate(self%ls_moist_dyn_itns) + call self%adj_solver_lookup_cache%finalise() + call self%adj_trans_lookup_cache%finalise() + return end subroutine finalise diff --git a/science/adjoint/source/algorithm/transport/control/atl_moist_mr_transport_alg_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_moist_mr_transport_alg_mod.x90 index 1f13aa011..464147193 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_moist_mr_transport_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/control/atl_moist_mr_transport_alg_mod.x90 @@ -15,6 +15,7 @@ module atl_moist_mr_transport_alg_mod use timing_mod, only: start_timing, stop_timing, & tik, LPROF use tl_transport_controller_mod, only: tl_transport_controller_type + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use transport_enumerated_types_mod, only: equation_form_advective, & equation_form_conservative use atl_transport_field_mod, only: atl_transport_field @@ -30,29 +31,30 @@ contains !============================================================================= !> @brief Central routine for adjoint transport of moisture fields. - !> @param[in,out] mr_out ACTIVE Perturbation to moisture mixing ratios - !> @param[in,out] mr_in ACTIVE Input perturbation state for moisture - !> @param[in] ls_mr_in PASSIVE Lin. state for moisture mixing ratios - !> @param[in] nummr_to_transport Number of moisture species to transport - !> @param[in,out] tl_transport_controller - !! Object controlling transport - !> @param[in,out] transport_metadata - !! Contains the configuration options for - !! transporting these fields + !> @param[in,out] mr_out ACTIVE Perturbation to moisture mixing ratios + !> @param[in,out] mr_in ACTIVE Input perturbation state for moisture + !> @param[in] ls_mr_in PASSIVE Lin. state for moisture mixing ratios + !> @param[in] nummr_to_transport Number of moisture species to transport + !> @param[in,out] tl_transport_controller Object controlling transport + !> @param[in,out] transport_metadata Contains the configuration options for + !! transporting these fields + !> @param[in] adj_lookup_table_cache Lookup table cache subroutine atl_moist_mr_transport_alg( mr_out, mr_in, ls_mr_in, & nummr_to_transport, & tl_transport_controller, & - transport_metadata ) + transport_metadata, & + adj_lookup_table_cache ) implicit none ! Arguments type(field_type), intent(inout) :: mr_out(nummr) type(field_type), intent(inout) :: mr_in(nummr) - type(field_type), intent(in) :: ls_mr_in(nummr) - integer(kind=i_def), intent(in) :: nummr_to_transport + type(field_type), intent(in) :: ls_mr_in(nummr) + integer(kind=i_def), intent(in) :: nummr_to_transport type(tl_transport_controller_type), intent(inout) :: tl_transport_controller type(transport_metadata_type), intent(inout) :: transport_metadata + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: imr @@ -80,7 +82,8 @@ contains ! Simply transport all the mixing ratio fields as they are in Wtheta do imr = nummr_to_transport, 1, -1 call atl_transport_field( mr_out(imr), mr_in(imr), ls_mr_in(imr), & - tl_transport_controller, transport_metadata ) + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) end do ! ------------------------------------------------------------------------ ! diff --git a/science/adjoint/source/algorithm/transport/control/atl_split_transport_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_split_transport_mod.x90 index 2295ba4f1..1019d840a 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_split_transport_mod.x90 +++ b/science/adjoint/source/algorithm/transport/control/atl_split_transport_mod.x90 @@ -19,6 +19,7 @@ module atl_split_transport_mod use transport_controller_mod, only: transport_controller_type use tl_transport_controller_mod, only: tl_transport_controller_type use transport_counter_mod, only: transport_counter_type + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use transport_enumerated_types_mod, only: direction_h, & direction_v, & split_method_null, & @@ -50,14 +51,14 @@ contains !> @details Manages the vertical/horizontal splitting of the split transport !! scheme by choosing the splitting type and calling the individual !! vertical and horizontal split components. - !> @param[in,out] field_np1 ACTIVE Field to return at end - !> @param[in,out] field_n ACTIVE Field at the start - !> @param[in] ls_field_n PASSIVE LS Field at the start - !> @param[in,out] tl_transport_controller - !! Encapsulating object containing the - !! transport counter and precomputations + !> @param[in,out] field_np1 ACTIVE Field to return at end + !> @param[in,out] field_n ACTIVE Field at the start + !> @param[in] ls_field_n PASSIVE LS Field at the start + !> @param[in,out] tl_transport_controller Encapsulating object containing the + !! transport counter and precomputations + !> @param[in] adj_lookup_table_cache Lookup table cache subroutine atl_split_transport_control(field_np1, field_n, ls_field_n, & - tl_transport_controller) + tl_transport_controller, adj_lookup_table_cache) implicit none @@ -66,6 +67,7 @@ contains type(r_tran_field_type), target, intent(inout) :: field_n type(r_tran_field_type), target, intent(in) :: ls_field_n type(tl_transport_controller_type), intent(inout) :: tl_transport_controller + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: num_split_steps @@ -159,22 +161,22 @@ contains call transport_counter%dec_split_step_counter() call ls_transport_counter%dec_split_step_counter() - call invoke( inc_X_plus_Y(field_np1, field_tmp ) ) - call invoke( setval_C(field_tmp, 0.0_r_def ) ) + call invoke( inc_X_plus_Y(field_np1, field_tmp ), & + setval_C(field_tmp, 0.0_r_def ) ) end if call atl_split_transport_field( & field_np1, field_tmp, ls_field_np1(split_step_count), & - tl_transport_controller & + tl_transport_controller, adj_lookup_table_cache & ) call invoke( setval_C(field_np1, 0.0_r_def ) ) end do - - call invoke( setval_C(field_np1, 0.0_r_def ) ) + if (num_split_steps <= 1) then + call invoke( setval_C(field_np1, 0.0_r_def ) ) + end if call invoke( inc_X_plus_Y(field_n, field_tmp) ) - call invoke( setval_C(field_tmp, 0.0_r_def ) ) deallocate( ls_field_np1 ) @@ -184,13 +186,14 @@ contains !> @brief Does either vertical or horizontal transport of a field. !> @details Performs a vertical or horizontal transport step, solving the !! transport equation for a (multidata) field. - !> @param[in,out] field_np1 ACTIVE Field to return at end - !> @param[in,out] field_n ACTIVE Field at the start - !> @param[in] ls_field_n PASSIVE Field at the start - !> @param[in,out] tl_transport_controller - !! Encapsulating object containing the - !! transport counter and precomputations - subroutine atl_split_transport_field(field_np1, field_n, ls_field_n, tl_transport_controller) + !> @param[in,out] field_np1 ACTIVE Field to return at end + !> @param[in,out] field_n ACTIVE Field at the start + !> @param[in] ls_field_n PASSIVE Field at the start + !> @param[in,out] tl_transport_controller Encapsulating object containing the + !! transport counter and precomputations + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atl_split_transport_field(field_np1, field_n, ls_field_n, & + tl_transport_controller, adj_lookup_table_cache) use atl_mol_conservative_alg_mod, only: atl_mol_conservative_alg use atl_mol_advective_alg_mod, only: atl_mol_advective_alg @@ -202,6 +205,7 @@ contains type(r_tran_field_type), intent(inout) :: field_n type(r_tran_field_type), intent(in) :: ls_field_n type(tl_transport_controller_type), intent(inout) :: tl_transport_controller + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: method, direction @@ -251,22 +255,22 @@ contains ! Choose form of transport equation select case ( transport_metadata%get_equation_form() ) case ( equation_form_conservative ) - call atl_mol_conservative_alg( & - field_np1, field_n, ls_field_n, tl_transport_controller & + call atl_mol_conservative_alg( & + field_np1, field_n, ls_field_n, tl_transport_controller, adj_lookup_table_cache & ) case ( equation_form_advective ) - call atl_mol_advective_alg( & - field_np1, field_n, ls_field_n, tl_transport_controller & + call atl_mol_advective_alg( & + field_np1, field_n, ls_field_n, tl_transport_controller, adj_lookup_table_cache & ) case ( equation_form_consistent ) - call log_event( & - 'ADJ: MoL Consistent not coded yet', & - LOG_LEVEL_ERROR & + call log_event( & + 'ADJ: MoL Consistent not coded yet', & + LOG_LEVEL_ERROR & ) case default - call log_event( & - 'Trying to solve unrecognised form of transport equation', & - LOG_LEVEL_ERROR & + call log_event( & + 'Trying to solve unrecognised form of transport equation', & + LOG_LEVEL_ERROR & ) end select diff --git a/science/adjoint/source/algorithm/transport/control/atl_theta_transport_alg_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_theta_transport_alg_mod.x90 index d4e2c7337..510a17d82 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_theta_transport_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/control/atl_theta_transport_alg_mod.x90 @@ -16,6 +16,7 @@ module atl_theta_transport_alg_mod theta_variable_dry, & adjust_theta use tl_transport_controller_mod, only: tl_transport_controller_type + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use transport_enumerated_types_mod, only: equation_form_advective, & equation_form_consistent use transport_metadata_mod, only: transport_metadata_type @@ -30,21 +31,22 @@ contains !============================================================================= !> @brief Adjoint routine for transporting potential temperature field. - !> @param[in,out] theta_out Perturbation: Dry potential temperature - !! after transport - !> @param[in,out] theta_inc Perturbation: Dry potential temperature - !! increment - !> @param[in,out] theta_in Perturbation: Dry potential temperature - !! before transport - !> @param[in] ls_theta_in Linear state: Dry potential temperature - !! before transport - !> @param[in,out] tl_transport_controller - !! Controls transport - !> @param[in,out] transport_metadata Contains the configuration options for - !! transporting the potential temperature - subroutine atl_theta_transport_alg( theta_out, theta_inc, & - theta_in, ls_theta_in, & - tl_transport_controller, transport_metadata ) + !> @param[in,out] theta_out Perturbation: Dry potential temperature + !! after transport + !> @param[in,out] theta_inc Perturbation: Dry potential temperature + !! increment + !> @param[in,out] theta_in Perturbation: Dry potential temperature + !! before transport + !> @param[in] ls_theta_in Linear state: Dry potential temperature + !! before transport + !> @param[in,out] tl_transport_controller Controls transport + !> @param[in,out] transport_metadata Contains the configuration options for + !! transporting the potential temperature + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atl_theta_transport_alg( theta_out, theta_inc, & + theta_in, ls_theta_in, & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) implicit none @@ -52,9 +54,10 @@ contains type(field_type), target, intent(inout) :: theta_out type(field_type), intent(inout) :: theta_inc type(field_type), target, intent(inout) :: theta_in - type(field_type), target, intent(in) :: ls_theta_in + type(field_type), target, intent(in) :: ls_theta_in type(tl_transport_controller_type), intent(inout) :: tl_transport_controller type(transport_metadata_type), intent(inout) :: transport_metadata + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables real(kind=r_def) :: one @@ -124,7 +127,8 @@ contains ! Consistent: Transformation to densities and evaluation of fluxes is in ! lowest level algorithms, so just call transport_field call atl_transport_field( theta_out_ptr, theta_in_ptr, ls_theta_in_ptr, & - tl_transport_controller, transport_metadata ) + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) ! ------------------------------------------------------------------------ ! ! Default form of transport equation diff --git a/science/adjoint/source/algorithm/transport/control/atl_transport_control_alg_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_transport_control_alg_mod.x90 index 2ed3d82dc..73689427d 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_transport_control_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/control/atl_transport_control_alg_mod.x90 @@ -19,6 +19,7 @@ module atl_transport_control_alg_mod use model_clock_mod, only: model_clock_type use transport_config_mod, only: cheap_update use tl_transport_controller_mod, only: tl_transport_controller_type + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use transport_controller_mod, only: transport_controller_type use flux_precomputations_alg_mod, only: flux_precomputations_type use wind_precomputations_alg_mod, only: wind_precomputations_type @@ -41,25 +42,26 @@ contains !============================================================================= !> @brief Adjoint of advection of prognostic variables for the tangent linear model. - !> @param[in,out] advection_inc ACTIVE Advection increment of the dynamics - !! prognostics [u, rho, theta, exner] - !> @param[in,out] advected_fields ACTIVE Fields to advect: [u, rho, theta, exner] - !> @param[in,out] wind_np1 ACTIVE End of timestep wind field - !> @param[in,out] wind_n ACTIVE Start of timestep wind field - !> @param[in,out] mr_out ACTIVE Moisture fields after transport - !> @param[in,out] mr_in ACTIVE Moisture fields before transport - !> @param[in] ls_advected_fields PASSIVE Fields to advect: [u, rho, theta, exner] - !> @param[in] ls_wind_np1 PASSIVE End of timestep wind field - !> @param[in] ls_wind_n PASSIVE Start of timestep wind field - !> @param[in] ls_mr_in PASSIVE Moisture fields before transport - !> @param[in] model_clock Time within the model - !> @param[in] outer Outer (advection) iteration number + !> @param[in,out] advection_inc ACTIVE Advection increment of the dynamics + !! prognostics [u, rho, theta, exner] + !> @param[in,out] advected_fields ACTIVE Fields to advect: [u, rho, theta, exner] + !> @param[in,out] wind_np1 ACTIVE End of timestep wind field + !> @param[in,out] wind_n ACTIVE Start of timestep wind field + !> @param[in,out] mr_out ACTIVE Moisture fields after transport + !> @param[in,out] mr_in ACTIVE Moisture fields before transport + !> @param[in] ls_advected_fields PASSIVE Fields to advect: [u, rho, theta, exner] + !> @param[in] ls_wind_np1 PASSIVE End of timestep wind field + !> @param[in] ls_wind_n PASSIVE Start of timestep wind field + !> @param[in] ls_mr_in PASSIVE Moisture fields before transport + !> @param[in] model_clock Time within the model + !> @param[in] outer Outer (advection) iteration number + !> @param[in] adj_lookup_table_cache Lookup table cache !> subroutine atl_transport_control_alg(advection_inc, advected_fields, & wind_np1, wind_n, mr_out, mr_in, & ls_advected_fields, & ls_wind_np1, ls_wind_n, ls_mr_in, & - model_clock, outer ) + model_clock, outer, adj_lookup_table_cache ) use derived_config_mod, only: bundle_size use sci_field_bundle_builtins_mod, only: clone_bundle, set_bundle_scalar @@ -80,18 +82,19 @@ contains implicit none ! Arguments - type(field_type), intent(inout) :: advection_inc(bundle_size) - type(field_type), intent(inout) :: advected_fields(bundle_size) - type(field_type), intent(inout) :: wind_np1 - type(field_type), intent(inout) :: wind_n - type(field_type), intent(in) :: ls_wind_np1 - type(field_type), intent(in) :: ls_wind_n - type(field_type), intent(inout) :: mr_out(nummr) - type(field_type), intent(inout) :: mr_in(nummr) - type(field_type), intent(in) :: ls_advected_fields(bundle_size) - type(field_type), intent(in) :: ls_mr_in(nummr) - class(model_clock_type), intent(in) :: model_clock - integer(kind=i_def), intent(in) :: outer + type(field_type), intent(inout) :: advection_inc(bundle_size) + type(field_type), intent(inout) :: advected_fields(bundle_size) + type(field_type), intent(inout) :: wind_np1 + type(field_type), intent(inout) :: wind_n + type(field_type), intent(in) :: ls_wind_np1 + type(field_type), intent(in) :: ls_wind_n + type(field_type), intent(inout) :: mr_out(nummr) + type(field_type), intent(inout) :: mr_in(nummr) + type(field_type), intent(in) :: ls_advected_fields(bundle_size) + type(field_type), intent(in) :: ls_mr_in(nummr) + class(model_clock_type), intent(in) :: model_clock + integer(kind=i_def), intent(in) :: outer + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables type(field_type) :: fields_np1(bundle_size) @@ -170,7 +173,7 @@ contains call atl_theta_transport_alg( & fields_np1(igh_t), advection_inc(igh_t), advected_fields(igh_t), & ls_advected_fields(igh_t), tl_transport_controller, & - transport_metadata & + transport_metadata, adj_lookup_table_cache & ) ! ------------------------------------------------------------------------- ! @@ -191,7 +194,8 @@ contains call atl_moist_mr_transport_alg( & mr_out, mr_in, ls_mr_in, nummr_to_transport, & - tl_transport_controller, transport_metadata & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache & ) end if @@ -215,7 +219,7 @@ contains call atl_wind_transport_alg( & advection_inc(igh_u), advected_fields(igh_u), & ls_advected_fields(igh_u), tl_transport_controller, & - transport_metadata & + transport_metadata, adj_lookup_table_cache & ) ! We don't change advection_inc(igh_u) as tl_wind_transport_alg ! already returns weak increment @@ -240,7 +244,7 @@ contains call atl_transport_field( & fields_np1(igh_d), advected_fields(igh_d), & ls_advected_fields(igh_d), tl_transport_controller, & - transport_metadata & + transport_metadata, adj_lookup_table_cache & ) ! The precomputation initialisation routines are initially called on diff --git a/science/adjoint/source/algorithm/transport/control/atl_transport_field_mod.f90 b/science/adjoint/source/algorithm/transport/control/atl_transport_field_mod.f90 index 2a7a05cf9..a755b961c 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_transport_field_mod.f90 +++ b/science/adjoint/source/algorithm/transport/control/atl_transport_field_mod.f90 @@ -18,6 +18,7 @@ module atl_transport_field_mod direction_3d, & equation_form_conservative, & equation_form_advective + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use atl_mol_conservative_alg_mod, only: atl_mol_conservative_alg use atl_mol_advective_alg_mod, only: atl_mol_advective_alg use atl_split_transport_mod, only: atl_split_transport_control @@ -35,15 +36,16 @@ module atl_transport_field_mod !============================================================================= !> @brief Adjoint of central routine for transporting fields in tangent-linear field. - !> @param[in,out] field_np1 ACTIVE Field to return at end of transport step - !> @param[in,out] field_n ACTIVE Field at the start of the transport step - !> @param[in] ls_field_n PASSIVE Linear field at the start of step - !> @param[in,out] tl_transport_controller - !! Object controlling transport by perturbed wind - !> @param[in] transport_metadata Contains the configuration options for - !! transporting these fields - subroutine atl_transport_field(field_np1, field_n, ls_field_n, & - tl_transport_controller, transport_metadata) + !> @param[in,out] field_np1 ACTIVE Field to return at end of transport step + !> @param[in,out] field_n ACTIVE Field at the start of the transport step + !> @param[in] ls_field_n PASSIVE Linear field at the start of step + !> @param[in,out] tl_transport_controller Object controlling transport by perturbed wind + !> @param[in] transport_metadata Contains the configuration options for + !! transporting these fields + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atl_transport_field(field_np1, field_n, ls_field_n, & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache) implicit none @@ -53,6 +55,7 @@ subroutine atl_transport_field(field_np1, field_n, ls_field_n, & type(field_type), intent(in) :: ls_field_n type(tl_transport_controller_type), intent(inout) :: tl_transport_controller type(transport_metadata_type), intent(inout) :: transport_metadata + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables type(transport_counter_type), pointer :: transport_counter @@ -87,13 +90,13 @@ subroutine atl_transport_field(field_np1, field_n, ls_field_n, & ! Choose form of transport equation select case ( transport_metadata%get_equation_form() ) case ( equation_form_conservative ) - call atl_mol_conservative_alg( & - field_np1, field_n, ls_field_n, tl_transport_controller & + call atl_mol_conservative_alg( & + field_np1, field_n, ls_field_n, tl_transport_controller, adj_lookup_table_cache & ) case ( equation_form_advective ) - call atl_mol_advective_alg( & - field_np1, field_n, ls_field_n, tl_transport_controller & + call atl_mol_advective_alg( & + field_np1, field_n, ls_field_n, tl_transport_controller, adj_lookup_table_cache & ) case default @@ -114,7 +117,7 @@ subroutine atl_transport_field(field_np1, field_n, ls_field_n, & ! -------------------------------------------------------------------------! case ( scheme_split ) call atl_split_transport_control(field_np1, field_n, ls_field_n, & - tl_transport_controller) + tl_transport_controller, adj_lookup_table_cache) case default call log_event('Trying to transport with unrecognised scheme', & diff --git a/science/adjoint/source/algorithm/transport/control/atl_wind_transport_alg_mod.x90 b/science/adjoint/source/algorithm/transport/control/atl_wind_transport_alg_mod.x90 index 5eb9f58c6..6f151b626 100644 --- a/science/adjoint/source/algorithm/transport/control/atl_wind_transport_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/control/atl_wind_transport_alg_mod.x90 @@ -33,6 +33,7 @@ module atl_wind_transport_alg_mod use transport_enumerated_types_mod, only: equation_form_advective use transport_config_mod, only: broken_w2_projection use tl_transport_controller_mod, only: tl_transport_controller_type + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use atl_transport_field_mod, only: atl_transport_field use transport_metadata_mod, only: transport_metadata_type use sci_field_minmax_alg_mod, only: log_field_minmax @@ -47,18 +48,19 @@ contains !============================================================================= !> @brief Central routine for adjoint transport of the wind field. - !> @param[in,out] rhs_u ACTIVE Right-hand-side for weak wind transport - !! equation. In other words, the advective - !! increment to the wind multiplied by the - !! W2 mass matrix. - !> @param[in,out] wind_n ACTIVE Wind field at start of transport step - !> @param[in] ls_wind_n PASSIVE Wind field at start of transport step - !> @param[in,out] tl_transport_controller - !! Object controlling transport - !> @param[in,out] transport_metadata Contains the configuration options for - !! transporting these fields - subroutine atl_wind_transport_alg( rhs_u, wind_n, ls_wind_n, & - tl_transport_controller, transport_metadata ) + !> @param[in,out] rhs_u ACTIVE Right-hand-side for weak wind transport + !! equation. In other words, the advective + !! increment to the wind multiplied by the + !! W2 mass matrix. + !> @param[in,out] wind_n ACTIVE Wind field at start of transport step + !> @param[in] ls_wind_n PASSIVE Wind field at start of transport step + !> @param[in,out] tl_transport_controller Object controlling transport + !> @param[in,out] transport_metadata Contains the configuration options for + !! transporting these fields + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atl_wind_transport_alg( rhs_u, wind_n, ls_wind_n, & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) use sci_dg_convert_hdiv_field_kernel_mod, only: dg_convert_hdiv_field_kernel_type use invoke_adj_cvt_hdiv_field_kernel_mod, only: invoke_adj_convert_hdiv_field_kernel @@ -72,9 +74,10 @@ contains ! Arguments type(field_type), intent(inout) :: rhs_u type(field_type), intent(inout) :: wind_n - type(field_type), intent(in) :: ls_wind_n + type(field_type), intent(in) :: ls_wind_n type(tl_transport_controller_type), intent(inout) :: tl_transport_controller type(transport_metadata_type), intent(inout) :: transport_metadata + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: dir @@ -197,8 +200,9 @@ contains ! Transport wind components in W3 ! -------------------------------------------------------------------- ! do dir = 3, 1, -1 - call atl_transport_field( u_w3_np1(dir), u_w3_n(dir), ls_u_w3_n(dir), & - tl_transport_controller, transport_metadata ) + call atl_transport_field( u_w3_np1(dir), u_w3_n(dir), ls_u_w3_n(dir), & + tl_transport_controller, transport_metadata, & + adj_lookup_table_cache ) end do ! Perturbation part diff --git a/science/adjoint/source/algorithm/transport/mol/adj_reconstruct_w3_field_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/adj_reconstruct_w3_field_alg_mod.x90 index b0bac45cf..f81998a06 100644 --- a/science/adjoint/source/algorithm/transport/mol/adj_reconstruct_w3_field_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/adj_reconstruct_w3_field_alg_mod.x90 @@ -7,14 +7,12 @@ !> @brief Adjoint reconstruction of a W3 field at W2 points for use in the transport scheme. module adj_reconstruct_w3_field_alg_mod - use check_configuration_mod, only: get_required_stencil_depth use constants_mod, only: r_tran, i_def, l_def use r_tran_field_mod, only: r_tran_field_type use invoke_adj_poly1d_recon_lookup_mod, only: invoke_adj_poly1d_recon_lookup use invoke_adj_poly2d_recon_lookup_mod, only: invoke_adj_poly2d_recon_lookup - use adj_lookup_table_generators_alg_mod, only: create_lookup_poly1d, & - create_lookup_poly2d + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use adj_lookup_table_mod, only: adj_lookup_table_type use integer_field_mod, only: integer_field_type use function_space_mod, only: function_space_type @@ -40,23 +38,25 @@ contains !============================================================================= !> @brief Adjoint of reconstruction of a W3 field in the horizontal component of W2 - !> @param[in,out] field_new The resulting horizontal W2 field - !> @param[in,out] field_old The input W3 field - !> @param[in] transport_metadata Contains transport configuration options + !> @param[in,out] field_new The resulting horizontal W2 field + !> @param[in,out] field_old The input W3 field + !> @param[in] transport_metadata Contains transport configuration options + !> @param[in] adj_lookup_table_cache Lookup table cache subroutine adj_hori_w3_reconstruct_alg( field_new, field_old, & - transport_metadata ) + transport_metadata, adj_lookup_table_cache ) implicit none - type(r_tran_field_type), intent(inout) :: field_new - type(r_tran_field_type), intent(inout) :: field_old - type(transport_metadata_type), intent(in) :: transport_metadata + type(r_tran_field_type), intent(inout) :: field_new + type(r_tran_field_type), intent(inout) :: field_old + type(transport_metadata_type), intent(in) :: transport_metadata + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache - type(mesh_type), pointer :: mesh - integer(kind=i_def) :: mesh_id - integer(kind=i_def) :: stencil_extent - integer(kind=i_def) :: stencil_size - type(r_tran_field_type), pointer :: flux_coeffs + type(mesh_type), pointer :: mesh + integer(kind=i_def) :: mesh_id + integer(kind=i_def) :: stencil_extent + integer(kind=i_def) :: stencil_size + type(r_tran_field_type), pointer :: flux_coeffs type(r_tran_field_type), target :: remap_field, field_old_big_halo type(r_tran_field_type), pointer :: field_ptr @@ -64,14 +64,14 @@ contains logical(kind=l_def) :: monotone integer(kind=i_def) :: remap_depth - type(adj_lookup_table_type) :: lookup_poly - type(integer_field_type), pointer :: lookup_poly_field - type(integer_field_type), pointer :: num_sets_poly_field - integer(kind=i_def) :: nsets - integer(kind=i_def) :: nindices + type(adj_lookup_table_type), pointer :: lookup_poly + type(integer_field_type), pointer :: lookup_poly_field + type(integer_field_type), pointer :: num_sets_poly_field + integer(kind=i_def) :: nsets + integer(kind=i_def) :: nindices nullify(mesh, flux_coeffs, field_ptr, & - lookup_poly_field, num_sets_poly_field) + lookup_poly, lookup_poly_field, num_sets_poly_field) mesh => field_new%get_mesh() mesh_id = mesh%get_id() @@ -90,7 +90,7 @@ contains ! Copy field to a large halo version call field_old_big_halo%initialise( field_old%get_function_space(), & - halo_depth = get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) call invoke( setval_c( field_old_big_halo, 0.0_r_tran ) ) monotone = (transport_metadata%get_horizontal_monotone() == monotone_koren) @@ -112,10 +112,7 @@ contains else if ( oned_reconstruction ) then ! Use 1d flux reconstruction - ! Create lookup table for stencil application. Essentially a dry run - ! of the TL kernel. - call create_lookup_poly1d( lookup_poly, field_new, field_ptr, & - flux_coeffs, stencil_extent, fv_horizontal_order ) + lookup_poly => adj_lookup_table_cache%get_lookup_poly1d() lookup_poly_field => lookup_poly%get_lookup_field() num_sets_poly_field => lookup_poly%get_set_count_field() nindices = lookup_poly%get_nindices() @@ -129,10 +126,7 @@ contains else ! Use 2d flux reconstruction stencil_extent = fv_horizontal_order / 2_i_def - ! Create lookup table for stencil application. Essentially a dry run - ! of the TL kernel. - call create_lookup_poly2d( lookup_poly, field_new, field_old_big_halo, flux_coeffs, & - stencil_size, stencil_extent ) + lookup_poly => adj_lookup_table_cache%get_lookup_poly2d(field_new%which_function_space()) lookup_poly_field => lookup_poly%get_lookup_field() num_sets_poly_field => lookup_poly%get_set_count_field() nindices = lookup_poly%get_nindices() diff --git a/science/adjoint/source/algorithm/transport/mol/adj_wt_advective_update_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/adj_wt_advective_update_alg_mod.x90 index 83fa0a54f..58617ce09 100644 --- a/science/adjoint/source/algorithm/transport/mol/adj_wt_advective_update_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/adj_wt_advective_update_alg_mod.x90 @@ -7,7 +7,6 @@ module adj_wt_advective_update_alg_mod - use check_configuration_mod, only : get_required_stencil_depth use constants_mod, only : r_tran, i_def, l_def use r_tran_field_mod, only : r_tran_field_type use finite_element_config_mod, only : element_order_h, & @@ -18,9 +17,7 @@ module adj_wt_advective_update_alg_mod use mesh_mod, only : mesh_type use invoke_adj_poly1d_recon_lookup_mod, only : invoke_adj_poly1d_recon_lookup - use adj_lookup_table_generators_alg_mod, only : create_lookup_poly1d, & - create_lookup_poly2d, & - create_lookup_poly_adv_upd + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use adj_lookup_table_mod, only : adj_lookup_table_type use integer_field_mod, only : integer_field_type @@ -49,20 +46,23 @@ contains !============================================================================= !> @brief Compute the adjoint of horizontal advective update of a Wtheta field. - !> @param[in,out] u_grad_f Horizontal part of u.grad(f) - !> @param[in] ls_wind Linearisation state wind field - !> @param[in] wind_dir Wind field used to determine direction in kernel - !> @param[in,out] field Wtheta field to advect - !> @param[in] transport_metadata Contains transport configuration options - subroutine adj_hori_wt_update_alg( u_grad_f, ls_wind, wind_dir, field, transport_metadata ) + !> @param[in,out] u_grad_f Horizontal part of u.grad(f) + !> @param[in] ls_wind Linearisation state wind field + !> @param[in] wind_dir Wind field used to determine direction in kernel + !> @param[in,out] field Wtheta field to advect + !> @param[in] transport_metadata Contains transport configuration options + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine adj_hori_wt_update_alg( u_grad_f, ls_wind, wind_dir, field, & + transport_metadata, adj_lookup_table_cache ) implicit none - type(r_tran_field_type), intent(inout) :: u_grad_f - type(r_tran_field_type), intent(in) :: ls_wind - type(r_tran_field_type), intent(in) :: wind_dir - type(r_tran_field_type), intent(inout) :: field - type(transport_metadata_type), intent(in) :: transport_metadata + type(r_tran_field_type), intent(inout) :: u_grad_f + type(r_tran_field_type), intent(in) :: ls_wind + type(r_tran_field_type), intent(in) :: wind_dir + type(r_tran_field_type), intent(inout) :: field + type(transport_metadata_type), intent(in) :: transport_metadata + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache type(r_tran_field_type) :: h_reconstruction type(r_tran_field_type), pointer :: adv_coeffs @@ -80,15 +80,16 @@ contains logical(kind=l_def) :: monotone integer(kind=i_def) :: remap_depth - type(adj_lookup_table_type) :: lookup_poly - type(adj_lookup_table_type) :: lookup_poly_adv - type(integer_field_type), pointer :: lookup_poly_field - type(integer_field_type), pointer :: num_sets_poly_field - integer(kind=i_def) :: nsets - integer(kind=i_def) :: nindices + type(adj_lookup_table_type), pointer :: lookup_poly + type(adj_lookup_table_type), pointer :: lookup_poly_adv + type(integer_field_type), pointer :: lookup_poly_field + type(integer_field_type), pointer :: num_sets_poly_field + integer(kind=i_def) :: nsets + integer(kind=i_def) :: nindices - nullify(lookup_poly_field, num_sets_poly_field, mesh, & - field_ptr, multidata_fs, adv_coeffs) + nullify(lookup_poly, lookup_poly_adv, & + lookup_poly_field, num_sets_poly_field, & + mesh, field_ptr, multidata_fs, adv_coeffs) mesh => ls_wind%get_mesh() mesh_id = mesh%get_id() @@ -104,7 +105,7 @@ contains ! Copy field to a large halo version call field_big_halo%initialise( field%get_function_space(), & - halo_depth = get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) ! Compute reconstruction on a Wtheta multidata field ! each Wt point contains 4 values assigned to each edge, @@ -133,8 +134,7 @@ contains stencil_extent = 1_i_def ! Invoke lookup table kernel for adj_poly_adv_update. - call create_lookup_poly_adv_upd( lookup_poly_adv, u_grad_f, h_reconstruction, & - ls_wind, stencil_extent ) + lookup_poly_adv => adj_lookup_table_cache%get_lookup_poly_adv_upd() lookup_poly_field => lookup_poly_adv%get_lookup_field() num_sets_poly_field => lookup_poly_adv%get_set_count_field() nindices = lookup_poly_adv%get_nindices() @@ -151,10 +151,7 @@ contains else if ( oned_reconstruction ) then ! Use 1d reconstruction - ! create lookup table for stencil application. essentially a dry run - ! of the tl kernel. - call create_lookup_poly1d( lookup_poly, h_reconstruction, field_ptr, & - adv_coeffs, stencil_extent, fv_horizontal_order ) + lookup_poly => adj_lookup_table_cache%get_lookup_poly1d() lookup_poly_field => lookup_poly%get_lookup_field() num_sets_poly_field => lookup_poly%get_set_count_field() nindices = lookup_poly%get_nindices() @@ -165,10 +162,7 @@ contains stencil_extent) else ! Use 2d reconstruction - ! Create lookup table for stencil application. Essentially a dry run - ! of the TL kernel. - call create_lookup_poly2d( lookup_poly, h_reconstruction, field_big_halo, & - adv_coeffs, stencil_size, stencil_extent ) + lookup_poly => adj_lookup_table_cache%get_lookup_poly2d(h_reconstruction%which_function_space()) lookup_poly_field => lookup_poly%get_lookup_field() num_sets_poly_field => lookup_poly%get_set_count_field() nindices = lookup_poly%get_nindices() diff --git a/science/adjoint/source/algorithm/transport/mol/atl_advective_and_flux_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_advective_and_flux_alg_mod.x90 index 942e1d603..dcf90b453 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_advective_and_flux_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_advective_and_flux_alg_mod.x90 @@ -26,7 +26,7 @@ module atl_advective_and_flux_alg_mod use vertical_mass_flux_kernel_mod, only: vertical_mass_flux_kernel_type use atl_w3h_advective_update_kernel_mod, only: atl_w3h_advective_update_kernel_type use invoke_adj_w3h_adv_upd_lookup_mod, only: invoke_adj_w3h_adv_upd_lookup_kernel_type - use adj_lookup_table_generators_alg_mod, only: create_lookup_w3h_adv_upd + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use adj_lookup_table_mod, only: adj_lookup_table_type use integer_field_mod, only: integer_field_type use atl_w3v_advective_update_kernel_mod, only: atl_w3v_advective_update_kernel_type @@ -53,39 +53,42 @@ contains !============================================================================! !> @brief Computes the tangent linear flux F and advective increment !> @details Compute the tangent linear mass flux and advective increment - !> @param[in,out] mass_flux_1 ACTIVE: mass flux to compute from - !! linear wind and perturbation field - !> @param[in,out] mass_flux_2 ACTIVE: mass flux to compute from - !! perturbation wind and linear field - !> @param[in,out] adv_inc ACTIVE: advective increment to compute - !> @param[in,out] density ACTIVE: W3 field to transport - !> @param[in,out] wind ACTIVE: transporting wind field - !> @param[in] ls_density PASSIVE: linearisation transported field - !> @param[in] ls_wind PASSIVE: linearisation transporting wind - !> @param[in] direction Direction of the transport - !> @param[in] transport_metadata Contains transport configuration options - !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage - !> @param[in] dt Advection time step - !> @param[in] do_flux Flag to compute mass_flux = wind*density - !> @param[in] do_advective Flag to compute adv_inc = wind.grad(density) + !> @param[in,out] mass_flux_1 ACTIVE: mass flux to compute from + !! linear wind and perturbation field + !> @param[in,out] mass_flux_2 ACTIVE: mass flux to compute from + !! perturbation wind and linear field + !> @param[in,out] adv_inc ACTIVE: advective increment to compute + !> @param[in,out] density ACTIVE: W3 field to transport + !> @param[in,out] wind ACTIVE: transporting wind field + !> @param[in] ls_density PASSIVE: linearisation transported field + !> @param[in] ls_wind PASSIVE: linearisation transporting wind + !> @param[in] direction Direction of the transport + !> @param[in] transport_metadata Contains transport configuration options + !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage + !> @param[in] dt Advection time step + !> @param[in] do_flux Flag to compute mass_flux = wind*density + !> @param[in] do_advective Flag to compute adv_inc = wind.grad(density) + !> @param[in] adj_lookup_table_cache Lookup table cache subroutine atl_advective_and_flux_alg( mass_flux_1, mass_flux_2, adv_inc, & density, wind, ls_density, ls_wind, & direction, transport_metadata, & final_rk_stage, dt, & - do_flux, do_advective ) + do_flux, do_advective, & + adj_lookup_table_cache ) implicit none - type(field_type), intent(inout) :: mass_flux_1, mass_flux_2 - type(field_type), intent(inout) :: density, wind - type(field_type), intent(in) :: ls_density, ls_wind - type(field_type), intent(inout) :: adv_inc - integer(kind=i_def), intent(in) :: direction - type(transport_metadata_type), intent(in) :: transport_metadata - logical(kind=l_def), intent(in) :: final_rk_stage - real(kind=r_def), intent(in) :: dt - logical(kind=l_def), intent(in) :: do_flux - logical(kind=l_def), intent(in) :: do_advective + type(field_type), intent(inout) :: mass_flux_1, mass_flux_2 + type(field_type), intent(inout) :: density, wind + type(field_type), intent(in) :: ls_density, ls_wind + type(field_type), intent(inout) :: adv_inc + integer(kind=i_def), intent(in) :: direction + type(transport_metadata_type), intent(in) :: transport_metadata + logical(kind=l_def), intent(in) :: final_rk_stage + real(kind=r_def), intent(in) :: dt + logical(kind=l_def), intent(in) :: do_flux + logical(kind=l_def), intent(in) :: do_advective + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables type(field_type) :: adv_inc_1, adv_inc_2 @@ -102,13 +105,13 @@ contains type(operator_type), pointer :: m3_inv integer(kind=i_def), parameter :: stencil_depth = 1 - type(adj_lookup_table_type) :: lookup_w3h - type(integer_field_type), pointer :: lookup_w3h_field - type(integer_field_type), pointer :: set_count_w3h_field - integer(kind=i_def) :: nsets - integer(kind=i_def) :: nindices + type(adj_lookup_table_type), pointer :: lookup_w3h + type(integer_field_type), pointer :: lookup_w3h_field + type(integer_field_type), pointer :: set_count_w3h_field + integer(kind=i_def) :: nsets + integer(kind=i_def) :: nindices - nullify(mesh, recon_fs, m3_inv, lookup_w3h_field, set_count_w3h_field) + nullify(mesh, recon_fs, m3_inv, lookup_w3h, lookup_w3h_field, set_count_w3h_field) mesh => density%get_mesh() @@ -204,10 +207,7 @@ contains wind, & m3_inv ) ) - ! Lookup table adjoint solution. Creation of lookup table is essentially - ! a dry-run of the TL code. - call create_lookup_w3h_adv_upd( lookup_w3h, adv_inc_1, reconstruction_field, & - wind, m3_inv, stencil_depth ) + lookup_w3h => adj_lookup_table_cache%get_lookup_w3h_adv_upd(ls_wind%which_function_space()) lookup_w3h_field => lookup_w3h%get_lookup_field() set_count_w3h_field => lookup_w3h%get_set_count_field() nindices = lookup_w3h%get_nindices() @@ -246,8 +246,9 @@ contains end if - call atl_reconstruct_w3_field_alg( reconstruction_field, density, ls_density, & - direction, transport_metadata, final_rk_stage ) + call atl_reconstruct_w3_field_alg( reconstruction_field, density, ls_density, & + direction, transport_metadata, final_rk_stage, & + adj_lookup_table_cache ) case ( Wtheta ) if ( do_flux ) then @@ -255,8 +256,9 @@ contains end if if ( do_advective ) then - call atl_wt_advective_update_alg( adv_inc, density, wind, ls_density, ls_wind, & - dt, direction, transport_metadata, final_rk_stage ) + call atl_wt_advective_update_alg( adv_inc, density, wind, ls_density, ls_wind, & + dt, direction, transport_metadata, final_rk_stage, & + adj_lookup_table_cache ) end if case default diff --git a/science/adjoint/source/algorithm/transport/mol/atl_mol_advective_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_mol_advective_alg_mod.x90 index 73f54a349..802aa9d5e 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_mol_advective_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_mol_advective_alg_mod.x90 @@ -13,6 +13,7 @@ module atl_mol_advective_alg_mod use mesh_mod, only: mesh_type ! Algorithms and transport code + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use advective_and_flux_alg_mod, only: advective_and_flux_alg use atl_advective_and_flux_alg_mod, only: atl_advective_and_flux_alg use end_of_transport_step_alg_mod, only: end_of_advective_step_alg @@ -38,14 +39,14 @@ contains !============================================================================= !> @brief Adjoint of tangent linear advection of a field with the MOL scheme. - !> @param[in,out] field_np1 ACTIVE Field at the end of the time step - !> @param[in] field ACTIVE Field at the start of the transport step - !> @param[in] ls_field PASSIVE Field at the start of the transport step - !> @param[in] direction Direction of advection (vertical, horizontal, or 3d) - !> @param[in,out] tl_transport_controller - !! Object controlling transport + !> @param[in,out] field_np1 ACTIVE Field at the end of the time step + !> @param[in] field ACTIVE Field at the start of the transport step + !> @param[in] ls_field PASSIVE Field at the start of the transport step + !> @param[in] direction Direction of advection (vertical, horizontal, or 3d) + !> @param[in,out] tl_transport_controller Object controlling transport + !> @param[in] adj_lookup_table_cache Lookup table cache subroutine atl_mol_advective_alg( field_np1, field, ls_field, & - tl_transport_controller ) + tl_transport_controller, adj_lookup_table_cache ) implicit none @@ -53,6 +54,7 @@ contains type(field_type), intent(inout) :: field type(field_type), intent(in) :: ls_field type(tl_transport_controller_type), intent(inout) :: tl_transport_controller + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: stage, s, direction @@ -253,7 +255,7 @@ contains dummy, dummy, rhs, rhs_field, advecting_wind, & stored_ls_field(ls_substep, ls_stage), ls_advecting_wind, & direction, transport_metadata, final_rk_stage, dt_mol_substep, & - .false., .true. & + .false., .true., adj_lookup_table_cache & ) do s = stage, 1, -1 diff --git a/science/adjoint/source/algorithm/transport/mol/atl_mol_conservative_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_mol_conservative_alg_mod.x90 index 7156b00b3..fc9502e2d 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_mol_conservative_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_mol_conservative_alg_mod.x90 @@ -19,6 +19,7 @@ module atl_mol_conservative_alg_mod tik, LPROF ! Algorithms and transport code + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type use advective_and_flux_alg_mod, only: advective_and_flux_alg use atl_advective_and_flux_alg_mod, only: atl_advective_and_flux_alg use end_of_transport_step_alg_mod, only: end_of_conservative_step_alg @@ -55,21 +56,22 @@ module atl_mol_conservative_alg_mod !============================================================================= !> @brief Adjoint of tangent linear transport (conservative-form) with the MOL scheme. - !> @param[in,out] field_np1 ACTIVE Field at the end of the time step - !> @param[in,out] field ACTIVE Field at the start of the transport step - !> @param[in] ls_field PASSIVE Field at the start of the transport step - !> @param[in,out] tl_transport_controller - !! Object controlling transport + !> @param[in,out] field_np1 ACTIVE Field at the end of the time step + !> @param[in,out] field ACTIVE Field at the start of the transport step + !> @param[in] ls_field PASSIVE Field at the start of the transport step + !> @param[in,out] tl_transport_controller Object controlling transport + !> @param[in] adj_lookup_table_cache Lookup table cache subroutine atl_mol_conservative_alg( field_np1, field, ls_field, & - tl_transport_controller ) + tl_transport_controller, adj_lookup_table_cache ) implicit none ! Arguments type(field_type), intent(inout) :: field_np1 type(field_type), intent(inout) :: field - type(field_type), intent(in) :: ls_field + type(field_type), intent(in) :: ls_field type(tl_transport_controller_type), intent(inout) :: tl_transport_controller + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache ! Internal variables integer(kind=i_def) :: mesh_id @@ -430,7 +432,7 @@ module atl_mol_conservative_alg_mod rhs_field, advecting_wind, & stored_ls_field(ls_substep,ls_stage), ls_advecting_wind, & direction, transport_metadata, final_rk_stage, & - dt_mol_substep, do_flux, do_advective & + dt_mol_substep, do_flux, do_advective, adj_lookup_table_cache & ) do s = stage, 1, -1 diff --git a/science/adjoint/source/algorithm/transport/mol/atl_reconstruct_w3_field_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_reconstruct_w3_field_alg_mod.x90 index 7aff24650..a4bf5ff64 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_reconstruct_w3_field_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_reconstruct_w3_field_alg_mod.x90 @@ -52,24 +52,29 @@ contains !============================================================================= !> @brief Reconstruct a W3 field at W2 points for adjoint app. - !> @param[in,out] field_new ACTIVE Reconstructed field at W2 points - !> @param[in,out] field_old ACTIVE Initial W3 field - !> @param[in] ls_field_old PASSIVE Initial W3 field - !> @param[in] direction Splitting direction (h, v, or 3d) to - !! compute reconstruction - !> @param[in] transport_metadata Contains transport configuration options - !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage - subroutine atl_reconstruct_w3_field_alg( field_new, field_old, ls_field_old, & - direction, transport_metadata, final_rk_stage ) + !> @param[in,out] field_new ACTIVE Reconstructed field at W2 points + !> @param[in,out] field_old ACTIVE Initial W3 field + !> @param[in] ls_field_old PASSIVE Initial W3 field + !> @param[in] direction Splitting direction (h, v, or 3d) to + !! compute reconstruction + !> @param[in] transport_metadata Contains transport configuration options + !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atl_reconstruct_w3_field_alg( field_new, field_old, ls_field_old, & + direction, transport_metadata, final_rk_stage, & + adj_lookup_table_cache ) + + use adj_trans_lookup_cache_mod, only: adj_trans_lookup_cache_type implicit none - type(field_type), intent(inout) :: field_old - type(field_type), intent(in) :: ls_field_old - type(field_type), intent(inout) :: field_new - integer(kind=i_def), intent(in) :: direction - type(transport_metadata_type), intent(in) :: transport_metadata - logical(kind=l_def), intent(in) :: final_rk_stage + type(field_type), intent(inout) :: field_old + type(field_type), intent(in) :: ls_field_old + type(field_type), intent(inout) :: field_new + integer(kind=i_def), intent(in) :: direction + type(transport_metadata_type), intent(in) :: transport_metadata + logical(kind=l_def), intent(in) :: final_rk_stage + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache type(mesh_type), pointer :: mesh type(field_type) :: field_new_h, field_new_v @@ -119,11 +124,11 @@ contains ls_field_old, transport_metadata, & final_rk_stage ) call adj_hori_w3_reconstruct_alg( field_new_h, field_old, & - transport_metadata ) + transport_metadata, adj_lookup_table_cache ) case ( direction_h ) call adj_hori_w3_reconstruct_alg( field_new, field_old, & - transport_metadata ) + transport_metadata, adj_lookup_table_cache ) case ( direction_v ) call atl_vert_w3_reconstruct_alg( field_new, field_old, & ls_field_old, transport_metadata, & diff --git a/science/adjoint/source/algorithm/transport/mol/atl_wt_advective_update_alg_mod.x90 b/science/adjoint/source/algorithm/transport/mol/atl_wt_advective_update_alg_mod.x90 index 09093efb6..f059c160c 100644 --- a/science/adjoint/source/algorithm/transport/mol/atl_wt_advective_update_alg_mod.x90 +++ b/science/adjoint/source/algorithm/transport/mol/atl_wt_advective_update_alg_mod.x90 @@ -48,21 +48,23 @@ contains !============================================================================= !> @brief Compute advective update of a Wtheta field for adjoint app. - !> @param[in,out] rhs ACTIVE Change in Advective increment - !> @param[in] adv_field ACTIVE Change in Field to advect - !> @param[in] wind ACTIVE Change in Advecting wind field - !> @param[in] ls_adv_field Lin state for Field to advect - !> @param[in] ls_wind Lin state for Advecting wind field - !> @param[in] dt Timestep - !> @param[in] direction Direction of the transport - !> @param[in] transport_metadata Contains transport configuration options - !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage - subroutine atl_wt_advective_update_alg( rhs, adv_field, wind, & - ls_adv_field, ls_wind, & - dt, direction, & - transport_metadata, final_rk_stage ) - - + !> @param[in,out] rhs ACTIVE Change in Advective increment + !> @param[in] adv_field ACTIVE Change in Field to advect + !> @param[in] wind ACTIVE Change in Advecting wind field + !> @param[in] ls_adv_field Lin state for Field to advect + !> @param[in] ls_wind Lin state for Advecting wind field + !> @param[in] dt Timestep + !> @param[in] direction Direction of the transport + !> @param[in] transport_metadata Contains transport configuration options + !> @param[in] final_rk_stage Whether this is the last Runge-Kutta stage + !> @param[in] adj_lookup_table_cache Lookup table cache + subroutine atl_wt_advective_update_alg( rhs, adv_field, wind, & + ls_adv_field, ls_wind, & + dt, direction, & + transport_metadata, final_rk_stage, & + adj_lookup_table_cache ) + + use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type use reference_element_mod, only : reference_element_type use mesh_mod, only : mesh_type use adj_wt_advective_update_alg_mod, only : adj_hori_wt_update_alg @@ -70,13 +72,14 @@ contains implicit none - type(field_type), intent(inout) :: adv_field, wind - type(field_type), intent(in) :: ls_adv_field, ls_wind - type(field_type), intent(inout) :: rhs - real(kind=r_def), intent(in) :: dt - integer(kind=i_def), intent(in) :: direction - type(transport_metadata_type), intent(in) :: transport_metadata - logical(kind=l_def), intent(in) :: final_rk_stage + type(field_type), intent(inout) :: adv_field, wind + type(field_type), intent(in) :: ls_adv_field, ls_wind + type(field_type), intent(inout) :: rhs + real(kind=r_def), intent(in) :: dt + integer(kind=i_def), intent(in) :: direction + type(transport_metadata_type), intent(in) :: transport_metadata + logical(kind=l_def), intent(in) :: final_rk_stage + type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache type(field_type) :: u_grad_f type(field_type) :: wind_v @@ -134,7 +137,8 @@ contains ! Horizontal update call atl_hori_wt_update_alg( u_grad_f, wind_h, ls_wind_h, ls_adv_field, transport_metadata ) - call adj_hori_wt_update_alg( u_grad_f, ls_wind_h, ls_wind_h, adv_field, transport_metadata ) + call adj_hori_wt_update_alg( u_grad_f, ls_wind_h, ls_wind_h, adv_field, transport_metadata, & + adj_lookup_table_cache ) call invoke( adj_split_w2_field_kernel_type(wind_h, wind_v, wind, & face_selector_ew, & @@ -143,7 +147,8 @@ contains case ( direction_h ) call atl_hori_wt_update_alg( u_grad_f, wind, ls_wind, ls_adv_field, transport_metadata ) - call adj_hori_wt_update_alg( u_grad_f, ls_wind, ls_wind, adv_field, transport_metadata ) + call adj_hori_wt_update_alg( u_grad_f, ls_wind, ls_wind, adv_field, transport_metadata, & + adj_lookup_table_cache ) case ( direction_v ) @@ -170,7 +175,6 @@ contains !> @param[in] transport_metadata Contains transport configuration options subroutine atl_hori_wt_update_alg(u_grad_f, wind, wind_dir, ls_field, transport_metadata) - use check_configuration_mod, only : get_required_stencil_depth use poly1d_reconstruction_kernel_mod, only : poly1d_reconstruction_kernel_type use poly2d_reconstruction_kernel_mod, only : poly2d_reconstruction_kernel_type use polyh_wtheta_koren_kernel_mod, only : polyh_wtheta_koren_kernel_type @@ -223,7 +227,7 @@ contains ! Copy field to a large halo version call ls_field_big_halo%initialise( ls_field%get_function_space(), & - halo_depth = get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) call invoke( setval_X( ls_field_big_halo, ls_field ) ) ! Compute reconstruction on a Wtheta multidata field diff --git a/science/adjoint/source/kernel/inter_function_space/adj_sci_convert_hdiv_field_kernel_mod.F90 b/science/adjoint/source/kernel/inter_function_space/adj_sci_convert_hdiv_field_kernel_mod.F90 index 86f1ffce1..190108550 100644 --- a/science/adjoint/source/kernel/inter_function_space/adj_sci_convert_hdiv_field_kernel_mod.F90 +++ b/science/adjoint/source/kernel/inter_function_space/adj_sci_convert_hdiv_field_kernel_mod.F90 @@ -17,6 +17,10 @@ module adj_sci_convert_hdiv_field_kernel_mod CELL_COLUMN, GH_EVALUATOR use constants_mod, only : i_def, r_def +use base_mesh_config_mod, only: geometry, topology +use finite_element_config_mod, only: coord_system +use planet_config_mod, only: scaled_radius + !> NOTE: Kernel requires PSyKAl lite code to invoke. Kernel metadata commented out. !> Please see PSyclone issue #2798 for further information. implicit none @@ -107,6 +111,7 @@ subroutine adj_convert_hdiv_field_code(nlayers, & map_pid) use sci_coordinate_jacobian_mod, only : coordinate_jacobian + implicit none ! Arguments @@ -154,8 +159,10 @@ subroutine adj_convert_hdiv_field_code(nlayers, & chi3_e(df) = chi3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, ndf1, chi1_e(:), chi2_e(:), chi3_e(:), & - ipanel, basis_chi(:,:,:), diff_basis_chi(:,:,:), jacobian(:,:,:), dj(:)) + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, ndf1, chi1_e(:), chi2_e(:), chi3_e(:), & + ipanel, basis_chi(:,:,:), diff_basis_chi(:,:,:), & + jacobian(:,:,:), dj(:)) do df = ndf1, 1, -1 vector_out(3) = vector_out(3) + physical_field3(map1(df) + k) diff --git a/science/adjoint/source/kernel/linear_physics/atl_bl_inc_kernel_mod.F90 b/science/adjoint/source/kernel/linear_physics/atl_bl_inc_kernel_mod.F90 new file mode 100644 index 000000000..797685522 --- /dev/null +++ b/science/adjoint/source/kernel/linear_physics/atl_bl_inc_kernel_mod.F90 @@ -0,0 +1,177 @@ +!----------------------------------------------------------------------------- +! (C) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- +!> @brief (Adjoint of) computes u_inc, the change in TLM velocity due to TLM boundary layer processes. +module atl_bl_inc_kernel_mod + + use argument_mod, only : arg_type, & + GH_FIELD, GH_OPERATOR, & + GH_SCALAR, GH_INTEGER, & + GH_READ, GH_INC, & + GH_REAL, CELL_COLUMN, & + ANY_DISCONTINUOUS_SPACE_1 + use constants_mod, only : r_def, i_def, r_um + use fs_continuity_mod, only : W1, W2, W3 + use kernel_mod, only : kernel_type + use reference_element_mod, only : N + + implicit none + + private + + !--------------------------------------------------------------------------- + ! Public types + !--------------------------------------------------------------------------- + + type, public, extends(kernel_type) :: atl_bl_inc_kernel_type + private + type(arg_type) :: meta_args(7) = (/ & + arg_type(GH_FIELD, GH_REAL, GH_INC, W2), & ! u_inc + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! u + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! Auv + arg_type(GH_FIELD, GH_REAL, GH_READ, W2), & ! Buv_inv + arg_type(GH_FIELD, GH_INTEGER, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! face_selector_ew + arg_type(GH_FIELD, GH_INTEGER, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! face_selector_ew + arg_type(GH_SCALAR, GH_INTEGER, GH_READ) & ! Blevs_m + /) + integer :: operates_on = CELL_COLUMN + contains + procedure, nopass :: atl_bl_inc_code + end type + + !--------------------------------------------------------------------------- + ! Contained functions/subroutines + !--------------------------------------------------------------------------- + public :: atl_bl_inc_code + +contains + +!> @brief (Adjoint of) computes u_inc, the change in TLM velocity due to TLM boundary layer processes. +!> @details The algorithm uses coefficients Auv and Buv_inv computed in tl_compute_aubu_kernel_mod. +!> The TLM BL scheme is described in Var Scientific Documentation Paper 55, +!> https://wwwspice/~frva/VAR/view/var-2025.03.0/doc/VSDP55_1A.pdf +!! @param[in] nlayers Number of layers +!! @param[in,out] u_inc Change in TLM velocity due to TLM boundary layer processes +!! @param[in] u TLM velocity +!! @param[in] nlayers Number of layers +!! @param[in] Auv Coefficient for TLM boundary layer +!! @param[in] Buv_inv Inverse of coefficient for TLM boundary layer +!! @param[in] face_selector_ew 2D field indicating which W/E faces to loop over in this column +!! @param[in] face_selector_ns 2D field indicating which N/S faces to loop over in this column +!! @param[in] Blevs_m Number of levels in momentum boundary layer +!! @param[in] ndf_w2 Number of degrees of freedom per cell for w2 space +!! @param[in] undf_w2 Number of unique degrees of freedom for w2 space +!! @param[in] map_w2 Dofmap for the cell at the base of the column for w2 +!! @param[in] ndf_w3_2d Number of DoFs for 2D W3 per cell +!! @param[in] undf_w3_2d Number of DoFs for this partition for 2D W3 +!! @param[in] map_w3_2d Map for 2D W3 +subroutine atl_bl_inc_code( nlayers, & + u_inc, & + u, & + Auv, & + Buv_inv, & + face_selector_ew, & + face_selector_ns, & + Blevs_m, & + ndf_w2, undf_w2, map_w2, & + ndf_w3_2d, undf_w3_2d, map_w3_2d ) + + implicit none + + ! Arguments + integer(kind=i_def), intent(in) :: nlayers + integer(kind=i_def), intent(in) :: undf_w2 + real(kind=r_def), dimension(undf_w2), intent(inout) :: u_inc + real(kind=r_def), dimension(undf_w2), intent(inout) :: u + integer(kind=i_def), intent(in) :: ndf_w2 + integer(kind=i_def), dimension(ndf_w2), intent(in) :: map_w2 + real(kind=r_def), dimension(undf_w2), intent(in) :: auv + real(kind=r_def), dimension(undf_w2), intent(in) :: buv_inv + integer(kind=i_def), intent(in) :: ndf_w3_2d + integer(kind=i_def), intent(in) :: undf_w3_2d + integer(kind=i_def), dimension(ndf_w3_2d), intent(in) :: map_w3_2d + integer(kind=i_def), dimension(undf_w3_2d), intent(in) :: face_selector_ew + integer(kind=i_def), dimension(undf_w3_2d), intent(in) :: face_selector_ns + integer(kind=i_def), intent(in) :: blevs_m + + ! Internal variables + integer(kind=i_def) :: df + integer(kind=i_def) :: k + integer(kind=i_def) :: j + real(kind=r_def), dimension(blevs_m) :: a0 ! Coefficient + real(kind=r_def), dimension(blevs_m) :: a1 ! Coefficient + real(kind=r_def), dimension(blevs_m) :: a2 ! Coefficient + real(kind=r_def), dimension(blevs_m) :: u_rhs ! Local perturbation velocity variable + real(kind=r_def), dimension(blevs_m) :: u_out ! Local perturbation velocity variable + real(kind=r_def), dimension(blevs_m) :: factor_u + + do j = face_selector_ew(map_w3_2d(1)) + face_selector_ns(map_w3_2d(1)), 1, -1 + + df = j + if (j == 3 .and. face_selector_ns(map_w3_2d(1)) == 2 .and. face_selector_ew(map_w3_2d(1)) == 1) df = n + + u_out = 0.0_r_def + + ! Set up coeffs a0, a1, a2, u_rhs + a0(1) = 1.0_r_def + (Auv(map_w2(df) + 1) + Auv(map_w2(df) + 0)) / Buv_inv(map_w2(df) + 1) + a1(1) = -Auv(map_w2(df) + 1) / Buv_inv(map_w2(df) + 1) + a2(1) = 0.0_r_def + + do k = 2, BLevs_m - 1 + a0(k) = 1.0_r_def + (Auv(map_w2(df) + k) + Auv(map_w2(df) + k - 1)) / Buv_inv(map_w2(df) + k) + a1(k) = -Auv(map_w2(df) + k) / Buv_inv(map_w2(df) + k) + a2(k) = -Auv(map_w2(df) + k - 1) / Buv_inv(map_w2(df) + k) + end do + + a0(BLevs_m) = 1.0_r_def + Auv(map_w2(df) + BLevs_m - 1) / Buv_inv(map_w2(df) + BLevs_m) + a1(BLevs_m) = 0.0_r_def + a2(BLevs_m) = -Auv(map_w2(df) + BLevs_m - 1) / Buv_inv(map_w2(df) + BLevs_m) + + a0(1) = 1.0_r_def / a0(1) + + do k = 2, BLevs_m + factor_u(k) = a2(k) * a0(k - 1) + a0(k) = 1.0_r_def / (a0(k) - factor_u(k) * a1(k - 1)) + end do + + ! (Adjoint of) solve for u_inc and transform to upper triangular form + do k = 1, blevs_m - 1 + u_out(k) = u_out(k) + u_inc(map_w2(df) + k - 1) + u_inc(map_w2(df) + k - 1) = 0.0_r_def + + u_out(k + 1) = u_out(k + 1) + (-a0(k) * a1(k) * u_out(k)) + u_rhs(k) = a0(k) * u_out(k) + end do + + u_out(blevs_m) = u_out(blevs_m) + u_inc(map_w2(df) + blevs_m - 1) + u_inc(map_w2(df) + blevs_m - 1) = 0.0_r_def + + u_rhs(blevs_m) = a0(blevs_m) * u_out(blevs_m) + + do k = blevs_m, 2, -1 + u_rhs(k - 1) = u_rhs(k - 1) + (-factor_u(k) * u_rhs(k)) + end do + + u(blevs_m + map_w2(df) - 2) = u(blevs_m + map_w2(df) - 2) + & + auv(blevs_m + map_w2(df) - 1) * u_rhs(blevs_m) / buv_inv(blevs_m + map_w2(df)) + u(blevs_m + map_w2(df) - 1) = u(blevs_m + map_w2(df) - 1) - & + auv(blevs_m + map_w2(df) - 1) * u_rhs(blevs_m) / buv_inv(blevs_m + map_w2(df)) + + do k = blevs_m - 1, 2, -1 + u(k + map_w2(df)) = u(k + map_w2(df)) + auv(k + map_w2(df)) * u_rhs(k) / buv_inv(k + map_w2(df)) + u(k + map_w2(df) - 1) = u(k + map_w2(df) - 1) - auv(k + map_w2(df)) * u_rhs(k) / buv_inv(k + map_w2(df)) + u(k + map_w2(df) - 2) = u(k + map_w2(df) - 2) + auv(k + map_w2(df) - 1) * u_rhs(k) / buv_inv(k + map_w2(df)) + u(k + map_w2(df) - 1) = u(k + map_w2(df) - 1) - auv(k + map_w2(df) - 1) * u_rhs(k) / buv_inv(k + map_w2(df)) + end do + + u(map_w2(df) + 1) = u(map_w2(df) + 1) + auv(map_w2(df) + 1) * u_rhs(1) / buv_inv(map_w2(df) + 1) + u(map_w2(df)) = u(map_w2(df)) - auv(map_w2(df) + 1) * u_rhs(1) / buv_inv(map_w2(df) + 1) + u(map_w2(df)) = u(map_w2(df)) - auv(map_w2(df)) * u_rhs(1) / buv_inv(map_w2(df) + 1) + + end do + +end subroutine atl_bl_inc_code + +end module atl_bl_inc_kernel_mod diff --git a/science/gungho/integration-test/cma_test/cma_test.f90 b/science/gungho/integration-test/cma_test/cma_test.f90 index 2797865da..50ae0f9a4 100644 --- a/science/gungho/integration-test/cma_test/cma_test.f90 +++ b/science/gungho/integration-test/cma_test/cma_test.f90 @@ -19,7 +19,6 @@ program cma_test use, intrinsic :: iso_fortran_env, only : real64 - use check_configuration_mod, only : get_required_stencil_depth use cma_test_algorithm_mod, only : cma_test_init, & test_cma_apply_mass_p, & test_cma_apply_mass_v, & @@ -29,7 +28,7 @@ program cma_test test_cma_add, & test_cma_apply_inv, & test_cma_diag_DhMDhT - use constants_mod, only : i_def, r_def, i_def, l_def, & + use constants_mod, only : i_def, r_def, i_def, l_def, imdi, & r_solver, pi, str_def use derived_config_mod, only : set_derived_config use extrusion_mod, only : extrusion_type, & @@ -130,7 +129,7 @@ program cma_test type(namelist_type), pointer :: base_mesh_nml type(namelist_type), pointer :: planet_nml - integer(i_def) :: stencil_depth + integer(i_def) :: stencil_depth(1) character(str_def) :: file_prefix character(str_def) :: prime_mesh_name real(r_def) :: radius @@ -289,7 +288,7 @@ program cma_test domain_height, & scaled_radius ) ) - stencil_depth = get_required_stencil_depth() + stencil_depth = 2 check_partitions = .false. call init_mesh( configuration, & local_rank, total_ranks, & @@ -307,7 +306,8 @@ program cma_test alt_name=twod_names ) call assign_mesh_maps(twod_names) - call init_chi_transforms(mesh_collection) + call init_chi_transforms(geometry_spherical, imdi, & + mesh_collection=mesh_collection) ! Work out grid spacing, which should be of order 1 mesh => mesh_collection%get_mesh(prime_mesh_name) diff --git a/science/gungho/rose-meta/lfric-gungho/version30_31.py b/science/gungho/rose-meta/lfric-gungho/version30_31.py new file mode 100644 index 000000000..09b9ecc07 --- /dev/null +++ b/science/gungho/rose-meta/lfric-gungho/version30_31.py @@ -0,0 +1,193 @@ +import re +import sys + +from metomi.rose.upgrade import MacroUpgrade + +from .version22_30 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 vn30_t99(MacroUpgrade): + """Upgrade macro for ticket #99 by Fred Wobus.""" + + BEFORE_TAG = "vn3.0" + AFTER_TAG = "vn3.0_t99" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric_atm + """Set segmentation size for Gregory-Rowntree convection kernel""" + self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") + return config, self.reports + + +class vn30_t146(MacroUpgrade): + """Upgrade macro for ticket #146 by Maggie Hendry.""" + + BEFORE_TAG = "vn3.0_t99" + AFTER_TAG = "vn3.0_t146" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/jules-lfric + # Add jules_model_environment_lfric namelist + source = self.get_setting_value( + config, ["file:configuration.nml", "source"] + ) + source = re.sub( + r"namelist:jules_hydrology", + r"namelist:jules_hydrology)" + + "\n" + + " (namelist:jules_model_environment_lfric", + source, + ) + self.change_setting_value( + config, ["file:configuration.nml", "source"], source + ) + self.add_setting( + config, + ["namelist:jules_model_environment_lfric", "l_jules_parent"], + "'lfric'", + ) + # Add jules_surface namelist items + self.add_setting( + config, + ["namelist:jules_surface", "all_tiles"], + "'off'", + ) + self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") + self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") + self.add_setting( + config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" + ) + self.add_setting( + config, + ["namelist:jules_surface", "fd_hill_option"], + "'capped_lowhill'", + ) + self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") + self.add_setting( + config, ["namelist:jules_surface", "fwe_c4"], "20000.0" + ) + self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") + self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") + self.add_setting( + config, ["namelist:jules_surface", "i_modiscopt"], "'on'" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_epot_corr"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." + ) + self.add_setting( + config, ["namelist:jules_surface", "orog_drag_param"], "0.15" + ) + self.add_setting( + config, ["namelist:jules_surface", "l_flake_model"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." + ) + self.add_setting( + config, ["namelist:jules_surface", "l_point_data"], ".false." + ) + return config, self.reports + + +class vn30_t135(MacroUpgrade): + """Upgrade macro for ticket #135 by James Manners.""" + + BEFORE_TAG = "vn3.0_t146" + AFTER_TAG = "vn3.0_t135" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/socrates-radiation + self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") + return config, self.reports + + +class vn30_t171(MacroUpgrade): + """Upgrade macro for ticket #171 by James Kent.""" + + BEFORE_TAG = "vn3.0_t135" + AFTER_TAG = "vn3.0_t171" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + # Add adjust_tracer_equation to transport namelist + self.add_setting( + config, ["namelist:transport", "adjust_tracer_equation"], ".false." + ) + return config, self.reports + + +class vn30_t214(MacroUpgrade): + """Upgrade macro for ticket #214 by mark Hedley.""" + + BEFORE_TAG = "vn3.0_t171" + AFTER_TAG = "vn3.0_t214" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-gungho + """Set segments configuration to true.""" + self.change_setting_value( + config, ["namelist:physics", "configure_segments"], ".true." + ) + return config, self.reports + + +class vn30_t306(MacroUpgrade): + """Upgrade macro for ticket TTTT by Unknown.""" + + BEFORE_TAG = "vn3.0_t214" + AFTER_TAG = "vn3.1" + + 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/vn3.1/rose-meta.conf b/science/gungho/rose-meta/lfric-gungho/vn3.1/rose-meta.conf new file mode 100644 index 000000000..26b0b447a --- /dev/null +++ b/science/gungho/rose-meta/lfric-gungho/vn3.1/rose-meta.conf @@ -0,0 +1,6856 @@ +import=lfric-driver/vn3.1 + =jules-lsm/vn3.1 + =socrates-radiation/vn3.1 + =um-aerosol/vn3.1 + =um-boundary_layer/vn3.1 + =um-chemistry/vn3.1 + =um-cloud/vn3.1 + =um-convection/vn3.1 + =um-iau/vn3.1 + =um-microphysics/vn3.1 + =um-orographic_drag/vn3.1 + =um-spectral_gwd/vn3.1 + =um-stochastic_physics/vn3.1 + +[!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=conv_gr_segment: .true. ; + =namelist:physics=gw_segment: .true. ; + =namelist:physics=ls_ppn_segment: .true. ; + =namelist:physics=ussp_segment: .true. ; +type=logical + +[namelist:physics=conv_gr_segment] +compulsory=true +description=Number of segments to be processed in Gregory-Rowntree convection +help=This determines the segment size to be processed. + = This sub-segment will be processed in a loop. + = A sensible default seems to be 16. +!kind=default +range=1:9999999 +type=integer + +[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_model_environment_lfric: 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_tracer_equation] +compulsory=true +description=Adjusts the equation form of conservative tracer groups to + =advective form if Watkins algorithm is unable to fix large + =Lipschitz numbers for consistent transport. This will break + =tracer convservation for any time steps this is needed. +fail-if= +help=Must be used with FFSL and SWIFT splittings +!kind=default +sort-key=Panel-A31 +trigger= +type=logical + +[namelist:transport=adjust_vhv_wind] +compulsory=true +description=Adjusts 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/gungho/source/algorithm/core_dynamics/intermesh_mappings_alg_mod.x90 b/science/gungho/source/algorithm/core_dynamics/intermesh_mappings_alg_mod.x90 index 19f953a48..12e8ac5e3 100644 --- a/science/gungho/source/algorithm/core_dynamics/intermesh_mappings_alg_mod.x90 +++ b/science/gungho/source/algorithm/core_dynamics/intermesh_mappings_alg_mod.x90 @@ -341,10 +341,9 @@ contains end if else - if ( present(lowest_order_flag) .and. lowest_order_flag ) then - recovery_order_arg = recovery_order_constant - else - recovery_order_arg = recovery_order + recovery_order_arg = recovery_order + if (present(lowest_order_flag)) then + if (lowest_order_flag) recovery_order_arg = recovery_order_constant end if if (ndata > 1) then if (present(source_mask)) then diff --git a/science/gungho/source/algorithm/solver/mixed_operator_alg_mod.x90 b/science/gungho/source/algorithm/solver/mixed_operator_alg_mod.x90 index 2c3dd341b..63faab91c 100644 --- a/science/gungho/source/algorithm/solver/mixed_operator_alg_mod.x90 +++ b/science/gungho/source/algorithm/solver/mixed_operator_alg_mod.x90 @@ -116,21 +116,17 @@ contains use limited_area_constants_mod, only: get_mask_r_solver use sci_enforce_bc_kernel_mod, only: enforce_bc_kernel_type use function_space_mod, only: function_space_type - use fs_continuity_mod, only: W2, W2h, W2v, W3, Wtheta + use fs_continuity_mod, only: W2, W2h, W2v, W3, Wtheta, W2Hbroken use function_space_collection_mod, only: function_space_collection - use apply_mixed_lu_operator_kernel_mod, & - only: apply_mixed_lu_operator_kernel_type - use apply_mixed_operator_kernel_mod, & - only: apply_mixed_operator_kernel_type + use apply_mixed_lu_operator_kernel_mod, only: apply_mixed_lu_operator_kernel_type use apply_elim_mixed_lp_operator_kernel_mod, & - only: apply_elim_mixed_lp_operator_kernel_type - use matrix_vector_kernel_mod, & - only: matrix_vector_kernel_type - use dg_inc_matrix_vector_kernel_mod, & - only: dg_inc_matrix_vector_kernel_type - use apply_mixed_operator_kernel_mod, & - only: apply_mixed_operator_kernel_type + only: apply_elim_mixed_lp_operator_kernel_type + use matrix_vector_kernel_mod, only: matrix_vector_kernel_type + use dg_inc_matrix_vector_kernel_mod, only: dg_inc_matrix_vector_kernel_type + use apply_mixed_u_operator_kernel_mod, only: apply_mixed_u_operator_kernel_type + use apply_mixed_wp_operator_kernel_mod, only: apply_mixed_wp_operator_kernel_type + use assemble_w2h_from_w2hb_kernel_mod, only: assemble_w2h_from_w2hb_kernel_type implicit none @@ -148,7 +144,8 @@ contains m2_diag type(r_solver_field_type) :: x_uvw, y_uvw type(function_space_type), pointer :: u_fs, & - t_fs + t_fs, & + w2hb_fs integer(i_def) :: p_h, p_v type(r_solver_field_type), pointer :: w2_mask, & w3_mask @@ -174,6 +171,8 @@ contains type(integer_field_type), pointer :: face_selector_ns integer(tik) :: id + type(r_solver_field_type) :: y_uv_broken + if ( LPROF ) call start_timing( id, 'mixed_solver.operator' ) ! Extract mesh ID @@ -225,6 +224,8 @@ contains xvec_w => x%get_field_from_position(isol_w) yvec_w => y%get_field_from_position(isol_w) end if + p_h = y%vector(isol_u)%get_element_order_h() + p_v = y%vector(isol_u)%get_element_order_v() ! Check if we can use the optimised operator setup optimised_operator = ( p2theta_vert .and. & @@ -236,8 +237,6 @@ contains if ( .not. optimised_operator ) then ! Create fields in 3D W2 space - p_h = y%vector(isol_u)%get_element_order_h() - p_v = y%vector(isol_u)%get_element_order_v() u_fs => function_space_collection%get_fs( mesh, p_h, p_v, W2 ) call x_uvw%initialise( vector_space = u_fs ) @@ -257,13 +256,28 @@ contains case ( eliminate_variables_discrete ) q32_op => get_eliminated_q32() if ( optimised_operator ) then - call invoke( name="apply_mixed_operator_new", & - setval_c( yvec_uv, 0.0_r_solver ), & - apply_mixed_operator_kernel_type( yvec_uv, yvec_w, yvec_p, & - xvec_uv, xvec_w, xvec_p, & - ptheta2, mt_lumped_inv, & - mm_vel, p2theta, div_star, m2_diag, & - m3_exner_star, q32_op, p3theta ) ) + ! Compute the lhs of mixed operator in two steps: + ! 1) Compute the horizontal wind lhs (yvec_uv), this is done in the broken W2 + ! space to avoid having to halo exchange the input fields. After computation of + ! the broken W2 lhs the continuous W2 lhs is computed which only requires a single + ! halo exchange. + ! 2) Compute the vertical wind (yvec_w) & pressure (yvec_p) lhs, since these + ! are horizontally discontinuous fields then there are no further halo exchanges required. + + ! Create broken y_uv + w2hb_fs => function_space_collection%get_fs(mesh, p_h, p_v, W2Hbroken) + call y_uv_broken%initialise( w2hb_fs ) + call invoke( name="apply_split_mixed_operator", & + apply_mixed_u_operator_kernel_type( y_uv_broken, & + xvec_uv, xvec_w, xvec_p, & + mm_vel, div_star, m2_diag ), & + setval_c( yvec_uv, 0.0_r_solver ), & + assemble_w2h_from_w2hb_kernel_type(yvec_uv, y_uv_broken), & + apply_mixed_wp_operator_kernel_type( yvec_w, yvec_p, & + xvec_uv, xvec_w, xvec_p, & + ptheta2, mt_lumped_inv, & + mm_vel, p2theta, div_star, m2_diag, & + m3_exner_star, q32_op, p3theta ) ) else ! Create theta' field t_fs => function_space_collection%get_fs( mesh, p_h, p_v, Wtheta ) diff --git a/science/gungho/source/algorithm/solver/mixed_schur_preconditioner_alg_mod.x90 b/science/gungho/source/algorithm/solver/mixed_schur_preconditioner_alg_mod.x90 index 7bb9237a3..70072ae47 100644 --- a/science/gungho/source/algorithm/solver/mixed_schur_preconditioner_alg_mod.x90 +++ b/science/gungho/source/algorithm/solver/mixed_schur_preconditioner_alg_mod.x90 @@ -455,6 +455,7 @@ contains exner_inc type(r_solver_field_type), target :: dummy_field + type(r_solver_field_type), target :: uvw_norm integer(tik) :: id if ( LPROF ) call start_timing( id, 'schur_precon.back_sub' ) @@ -479,11 +480,13 @@ contains call dummy_field%initialise( vector_space = self%rhs_u%get_function_space() ) w2_mask => dummy_field end if + call uvw_norm%initialise( vector_space = self%rhs_u%get_function_space() ) call invoke( name = "compute_split_increments", & + X_times_Y(uvw_norm, u_normalisation, Hb_lumped_inv), & setval_c(state_uv, 0.0_r_solver), & schur_backsub_kernel_type( state_uv, state_w, self%rhs_u, & exner_inc, div_star, & - u_normalisation, Hb_lumped_inv, & + uvw_norm, & limited_area, w2_mask ) ) else call u_inc%initialise( vector_space = self%rhs_u%get_function_space() ) diff --git a/science/gungho/source/algorithm/transport/common/remap_on_extended_mesh_alg_mod.x90 b/science/gungho/source/algorithm/transport/common/remap_on_extended_mesh_alg_mod.x90 index 528d5b2fd..ea01e52fe 100644 --- a/science/gungho/source/algorithm/transport/common/remap_on_extended_mesh_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/common/remap_on_extended_mesh_alg_mod.x90 @@ -16,7 +16,6 @@ module remap_on_extended_mesh_alg_mod use psykal_lite_transport_mod, only: invoke_remap_on_extended_mesh_kernel_type use timing_mod, only: start_timing, stop_timing, tik, LPROF use function_space_mod, only: function_space_type - use check_configuration_mod, only: get_required_stencil_depth use transport_constants_mod, only: get_extended_mesh_weights, & get_extended_mesh_indices, & ext_mesh_stencil_depth @@ -76,7 +75,7 @@ contains ndata = fs%get_ndata() ! Ensure remapping depth is not larger than the halo depth - depth = min( depth_in, get_required_stencil_depth() ) + depth = min( depth_in, mesh%get_halo_depth() ) ! Both the field to be remapped and the remapped field need to be ! created with the full size halo. For the field to be remapped ! this is due to the interpolation parallel to a panel boundary diff --git a/science/gungho/source/algorithm/transport/ffsl/ffsl_hori_alg_mod.x90 b/science/gungho/source/algorithm/transport/ffsl/ffsl_hori_alg_mod.x90 index 7fc12fc08..52b693976 100644 --- a/science/gungho/source/algorithm/transport/ffsl/ffsl_hori_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/ffsl/ffsl_hori_alg_mod.x90 @@ -75,6 +75,7 @@ module ffsl_hori_alg_mod transport_overwrite_freq_all use check_configuration_mod, only: check_any_eqn_consistent, & get_required_stencil_depth + use io_config_mod, only: subroutine_timers use transport_config_mod, only: & panel_edge_treatment, & panel_edge_treatment_extended_mesh, & @@ -430,7 +431,7 @@ contains remap_depth) else call field_big_halo%initialise( field_n%get_function_space(), & - halo_depth=get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) call invoke( setval_x(field_big_halo, field_n) ) end if ! Copy required as PSyclone doesn't allow the same field to be @@ -715,7 +716,7 @@ contains remap_depth) else call field_big_halo%initialise( field_n%get_function_space(), & - halo_depth=get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) call invoke( setval_x(field_big_halo, field_n) ) end if @@ -1074,8 +1075,8 @@ contains transport_metadata%get_min_value(), & remap_depth) else - call field_x_big_halo%initialise(field_fs, halo_depth=get_required_stencil_depth()) - call field_y_big_halo%initialise(field_fs, halo_depth=get_required_stencil_depth()) + call field_x_big_halo%initialise(field_fs, halo_depth=mesh%get_halo_depth()) + call field_y_big_halo%initialise(field_fs, halo_depth=mesh%get_halo_depth()) call invoke( setval_x(field_x_big_halo, field_x), & setval_x(field_y_big_halo, field_y) ) end if diff --git a/science/gungho/source/algorithm/transport/mol/reconstruct_w3_field_alg_mod.x90 b/science/gungho/source/algorithm/transport/mol/reconstruct_w3_field_alg_mod.x90 index 4134b714c..6b9b9e537 100644 --- a/science/gungho/source/algorithm/transport/mol/reconstruct_w3_field_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/mol/reconstruct_w3_field_alg_mod.x90 @@ -18,7 +18,6 @@ !! size as an integer argument. module reconstruct_w3_field_alg_mod - use check_configuration_mod, only: get_required_stencil_depth use sci_combine_multidata_field_kernel_mod, & only: combine_multidata_field_kernel_type use constants_mod, only: r_def, i_def, l_def, str_def @@ -197,7 +196,7 @@ contains ! Copy field to a large halo version call field_old_big_halo%initialise( field_old%get_function_space(), & - halo_depth = get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) call invoke( setval_X( field_old_big_halo, field_old ) ) monotone = (transport_metadata%get_horizontal_monotone() == monotone_koren) diff --git a/science/gungho/source/algorithm/transport/mol/wt_advective_update_alg_mod.x90 b/science/gungho/source/algorithm/transport/mol/wt_advective_update_alg_mod.x90 index fb258b55b..46b6b5fbc 100644 --- a/science/gungho/source/algorithm/transport/mol/wt_advective_update_alg_mod.x90 +++ b/science/gungho/source/algorithm/transport/mol/wt_advective_update_alg_mod.x90 @@ -18,7 +18,6 @@ !! size as an integer argument. module wt_advective_update_alg_mod - use check_configuration_mod, only: get_required_stencil_depth use constants_mod, only: r_def, i_def, l_def, str_def, & r_tran use sci_geometric_constants_mod, only: get_coordinates, & @@ -133,7 +132,7 @@ contains ! Copy field to a large halo version call field_big_halo%initialise( field%get_function_space(), & - halo_depth = get_required_stencil_depth() ) + halo_depth=mesh%get_halo_depth() ) call invoke( setval_X( field_big_halo, field ) ) ! Compute reconstruction on a Wtheta multidata field diff --git a/science/gungho/source/configuration/check_configuration_mod.F90 b/science/gungho/source/configuration/check_configuration_mod.F90 index 86252a85a..e2a1e8e6e 100644 --- a/science/gungho/source/configuration/check_configuration_mod.F90 +++ b/science/gungho/source/configuration/check_configuration_mod.F90 @@ -6,7 +6,7 @@ module check_configuration_mod - use constants_mod, only: i_def, l_def + use constants_mod, only: i_def, l_def, str_def use mixing_config_mod, only: viscosity, & viscosity_mu use transport_config_mod, only: operators, & @@ -48,7 +48,7 @@ module check_configuration_mod substep_transport, & substep_transport_off, & adjust_vhv_wind, & - ffsl_unity_3d, & + ffsl_unity_3d, & wind_mono_top use transport_enumerated_types_mod, & only: scheme_mol_3d, & @@ -71,6 +71,9 @@ module check_configuration_mod monotone_qm_pos, & ffsl_splitting_swift, & ffsl_splitting_cosmic + use namelist_collection_mod, & + only : namelist_collection_type + use namelist_mod, only : namelist_type implicit none @@ -612,31 +615,87 @@ subroutine check_configuration(modeldb) end subroutine check_configuration - !> @brief Determine required stencil depth for the current configuration. + !> @brief Determine required stencil depth for the current configuration, + !! for each mesh. !> @details Depending on the choice of science schemes the required local !> mesh needs to support the anticipated stencils. This function !> returns required stencil depth that needs to be supported. - !> @return stencil_depth - !> + !> @param[in,out] stencil_depths Array of stencil depths for each base mesh + !> @param[in] base_mesh_names Array of base mesh names + !> @param[in] configuration The configuration object !=========================================================================== - function get_required_stencil_depth() result(stencil_depth) + subroutine get_required_stencil_depth(stencil_depths, base_mesh_names, configuration) implicit none - integer(kind=i_def) :: stencil_depth - integer(kind=i_def) :: sl_depth, special_edge_pts + integer(kind=i_def), intent(inout) :: stencil_depths(:) + character(len=str_def), intent(in) :: base_mesh_names(:) + type(namelist_collection_type), intent(in) :: configuration + + + integer(kind=i_def) :: i + integer(kind=i_def) :: transport_depth, sl_depth + integer(kind=i_def) :: special_edge_pts logical(kind=l_def) :: any_horz_dep_pts - stencil_depth = 2 + ! Configuration variables + type(namelist_type), pointer :: base_mesh_nml + type(namelist_type), pointer :: formulation_nml + type(namelist_type), pointer :: multires_coupling_nml + type(namelist_type), pointer :: transport_nml + character(len=str_def) :: prime_mesh_name + character(len=str_def) :: aerosol_mesh_name + logical(kind=l_def) :: use_multires_coupling + logical(kind=l_def) :: coarse_aerosol_transport + integer(kind=i_def) :: operators + integer(kind=i_def) :: fv_horizontal_order + integer(kind=i_def) :: panel_edge_treatment + logical(kind=l_def) :: panel_edge_high_order + integer(kind=i_def) :: dep_pt_stencil_extent + integer(kind=i_def) :: ffsl_inner_order + integer(kind=i_def) :: ffsl_outer_order + + ! ------------------------------------------------------------------------ ! + ! Get configuration variables + ! ------------------------------------------------------------------------ ! + + base_mesh_nml => configuration%get_namelist('base_mesh') + formulation_nml => configuration%get_namelist('formulation') + transport_nml => configuration%get_namelist('transport') + + call base_mesh_nml%get_value('prime_mesh_name', prime_mesh_name) + call formulation_nml%get_value('use_multires_coupling', use_multires_coupling) + call transport_nml%get_value('operators', operators) + call transport_nml%get_value('fv_horizontal_order', fv_horizontal_order) + call transport_nml%get_value('panel_edge_treatment', panel_edge_treatment) + call transport_nml%get_value('panel_edge_high_order', panel_edge_high_order) + call transport_nml%get_value('dep_pt_stencil_extent', dep_pt_stencil_extent) + call transport_nml%get_value('ffsl_inner_order', ffsl_inner_order) + call transport_nml%get_value('ffsl_outer_order', ffsl_outer_order) + if (use_multires_coupling) then + multires_coupling_nml => configuration%get_namelist('multires_coupling') + call multires_coupling_nml%get_value('aerosol_mesh_name', aerosol_mesh_name) + call multires_coupling_nml%get_value('coarse_aerosol_transport', coarse_aerosol_transport) + end if + + ! ------------------------------------------------------------------------ ! + ! Set default depth + ! ------------------------------------------------------------------------ ! + + transport_depth = 2 if (operators == operators_fv) then ! Need larger halos for fv operators - stencil_depth = max( stencil_depth, fv_horizontal_order/2 ) + transport_depth = max( transport_depth, fv_horizontal_order/2 ) end if + ! ------------------------------------------------------------------------ ! + ! Determine depth when using a semi-Lagrangian scheme + ! ------------------------------------------------------------------------ ! + any_horz_dep_pts = check_horz_dep_pts() - if ( any_horz_dep_pts ) then + if (any_horz_dep_pts) then ! When an SL scheme is used, the halo depth should be large enough to ! encompass the largest anticipated Courant number (effectively the ! departure distance in the SL scheme), plus any extra cells required for @@ -646,8 +705,8 @@ function get_required_stencil_depth() result(stencil_depth) ! - the order of reconstruction ! - whether special edge treatment is used (this shifts the stencil by 1) - if ( panel_edge_treatment == panel_edge_treatment_special_edges & - .AND. panel_edge_high_order ) then + if (panel_edge_treatment == panel_edge_treatment_special_edges & + .AND. panel_edge_high_order) then special_edge_pts = 1 else special_edge_pts = 0 @@ -659,18 +718,39 @@ function get_required_stencil_depth() result(stencil_depth) + special_edge_pts & ! special edge treatment ) - if ( panel_edge_treatment == panel_edge_treatment_remapping ) then - if ( panel_edge_high_order ) then - sl_depth = max( sl_depth, 3 ) + if (panel_edge_treatment == panel_edge_treatment_remapping) then + if (panel_edge_high_order) then + transport_depth = max( sl_depth, 3 ) else sl_depth = max( sl_depth, 2 ) end if end if - stencil_depth = max( stencil_depth, sl_depth ) + transport_depth = max( transport_depth, sl_depth ) end if - end function get_required_stencil_depth + ! ------------------------------------------------------------------------ ! + ! Set depth for each mesh + ! ------------------------------------------------------------------------ ! + + ! Loop through meshes to determine whether transport takes place on it + do i = 1, size(base_mesh_names) + if (trim(base_mesh_names(i)) == trim(prime_mesh_name)) then + ! Assume transport always occurs on prime mesh + stencil_depths(i) = transport_depth + + else if (use_multires_coupling .and. coarse_aerosol_transport .and. & + trim(base_mesh_names(i)) == trim(aerosol_mesh_name)) then + ! Coarse mesh transport for aerosols + stencil_depths(i) = transport_depth + + else + ! No transport on this mesh, so set stencil depth to 2 + stencil_depths(i) = 2 + end if + end do + + end subroutine get_required_stencil_depth !> @brief Determine whether any of the transport schemes are MoL !> @details Loops through the transport schemes specified for different diff --git a/science/gungho/source/driver/gungho_model_mod.F90 b/science/gungho/source/driver/gungho_model_mod.F90 index e91f0fbd6..00c9842f7 100644 --- a/science/gungho/source/driver/gungho_model_mod.F90 +++ b/science/gungho/source/driver/gungho_model_mod.F90 @@ -417,6 +417,7 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) logical(l_def) :: mesh_already_exists integer(i_def) :: i, j, mesh_ctr + integer(i_def), allocatable :: stencil_depths(:) character(str_def), allocatable :: base_mesh_names(:) character(str_def), allocatable :: meshes_to_shift(:) character(str_def), allocatable :: meshes_to_double(:) @@ -445,7 +446,6 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) integer(i_def) :: geometry integer(i_def) :: extrusion_method - integer(i_def) :: stencil_depth real(r_def) :: domain_bottom real(r_def) :: domain_height real(r_def) :: scaled_radius @@ -672,13 +672,17 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) apply_partition_check = .true. end if - stencil_depth = get_required_stencil_depth() + allocate(stencil_depths(size(base_mesh_names))) + call get_required_stencil_depth( & + stencil_depths, base_mesh_names, modeldb%configuration & + ) + call init_mesh( modeldb%configuration, & modeldb%mpi%get_comm_rank(), & modeldb%mpi%get_comm_size(), & base_mesh_names, & extrusion, & - get_required_stencil_depth(), & + stencil_depths, & apply_partition_check ) @@ -922,6 +926,7 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) chi_inventory, panel_id_inventory, files_init_ptr, & orography_mesh, orography_twod_mesh) deallocate(base_mesh_names) + deallocate(stencil_depths) if (allocated(meshes_to_shift)) deallocate(meshes_to_shift) if (allocated(meshes_to_double)) deallocate(meshes_to_double) diff --git a/science/gungho/source/driver/gungho_step_mod.x90 b/science/gungho/source/driver/gungho_step_mod.x90 index cd5169780..82b475792 100644 --- a/science/gungho/source/driver/gungho_step_mod.x90 +++ b/science/gungho/source/driver/gungho_step_mod.x90 @@ -122,11 +122,13 @@ module gungho_step_mod '(A,I0)' ) 'Start of timestep ', model_clock%get_step() call log_event( log_scratch_space, LOG_LEVEL_INFO ) - temp_corr_io_value => get_io_value( modeldb%values, 'temperature_correction_io_value') - call modeldb%values%get_value( 'total_dry_mass', total_dry_mass ) - call modeldb%values%get_value( 'total_energy', total_energy ) - call modeldb%values%get_value( 'total_energy_previous', & - total_energy_previous ) + if ( encorr_usage /= encorr_usage_none .or. write_conservation_diag ) then + temp_corr_io_value => get_io_value( modeldb%values, 'temperature_correction_io_value') + call modeldb%values%get_value( 'total_dry_mass', total_dry_mass ) + call modeldb%values%get_value( 'total_energy', total_energy ) + call modeldb%values%get_value( 'total_energy_previous', & + total_energy_previous ) + end if use_moisture = ( moisture_formulation /= moisture_formulation_dry ) diff --git a/science/gungho/source/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod.F90 new file mode 100644 index 000000000..7c4a6ffe4 --- /dev/null +++ b/science/gungho/source/kernel/core_dynamics/assemble_w2h_from_w2hb_kernel_mod.F90 @@ -0,0 +1,95 @@ +!----------------------------------------------------------------------------- +! (c) Crown copyright 2026 Met Office. All rights reserved. +! The file LICENCE, distributed with this code, contains details of the terms +! under which the code may be used. +!----------------------------------------------------------------------------- +!> @brief Maps a field from W2h broken to W2h. +!> @details Forms a continuous W2h field by adding the components from a +!! broken W2h field on either side of the mesh facets. +module assemble_w2h_from_w2hb_kernel_mod + + use argument_mod, only : arg_type, & + GH_FIELD, GH_REAL, & + GH_READ, GH_INC, & + CELL_COLUMN + use constants_mod, only : r_solver, i_def + use fs_continuity_mod, only : W2h, W2broken + use kernel_mod, only : kernel_type + + implicit none + + private + + !--------------------------------------------------------------------------- + ! Public types + !--------------------------------------------------------------------------- + !> The type declaration for the kernel. Contains the metadata needed by the + !> Psy layer. + !> + type, public, extends(kernel_type) :: assemble_w2h_from_w2hb_kernel_type + private + type(arg_type) :: meta_args(2) = (/ & + arg_type(GH_FIELD, GH_REAL, GH_INC, W2h), & ! field_w2h + arg_type(GH_FIELD, GH_REAL, GH_READ, W2broken) & ! field_w2h_broken + /) + integer :: operates_on = CELL_COLUMN + contains + procedure, nopass :: assemble_w2h_from_w2hb_code + end type + + !--------------------------------------------------------------------------- + ! Contained functions/subroutines + !--------------------------------------------------------------------------- + public :: assemble_w2h_from_w2hb_code + +contains + +!> @brief Converts a broken W2h field into a continuous W2h field +!> +!> @param[in] nlayers Number of layers in the mesh +!> @param[in,out] field_w2h Field in the W2h space to be returned. +!> @param[in] field_w2h_broken Original field in W2h broken to be used. +!> @param[in] ndf_w2h Number of degrees of freedom per cell for W2h +!> @param[in] undf_w2h Number of (local) unique degrees of freedom for W2h +!> @param[in] map_w2h Dofmap for the cell at the base of the column for W2h +!> @param[in] ndf_w2h_broken Number of degrees of freedom per cell for W2h broken +!> @param[in] undf_w2h_broken Number of (local) unique degrees of freedom for W2h broken +!> @param[in] map_w2h_broken Dofmap for the cell at the base of the column for W2h broken +subroutine assemble_w2h_from_w2hb_code( nlayers, & + field_w2h, & + field_w2h_broken, & + ndf_w2h, & + undf_w2h, & + map_w2h, & + ndf_w2h_broken, & + undf_w2h_broken, & + map_w2h_broken & + ) + + implicit none + + ! Arguments + integer(kind=i_def), intent(in) :: nlayers + integer(kind=i_def), intent(in) :: ndf_w2h_broken, ndf_w2h + integer(kind=i_def), intent(in) :: undf_w2h_broken, undf_w2h + integer(kind=i_def), dimension(ndf_w2h_broken), intent(in) :: map_w2h_broken + integer(kind=i_def), dimension(ndf_w2h), intent(in) :: map_w2h + + real(kind=r_solver), dimension(undf_w2h), intent(inout) :: field_w2h + real(kind=r_solver), dimension(undf_w2h_broken), intent(in) :: field_w2h_broken + + ! Internal variables + integer(kind=i_def) :: df, k + + ! Loop over horizontal W2h DoFs + do df = 1, ndf_w2h + ! Loop over layers of mesh + do k = 0, nlayers - 1 + field_w2h(map_w2h(df)+k) = field_w2h(map_w2h(df)+k) & + + field_w2h_broken(map_w2h_broken(df)+k) + end do + end do + +end subroutine assemble_w2h_from_w2hb_code + +end module assemble_w2h_from_w2hb_kernel_mod diff --git a/science/gungho/source/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod.F90 index 9ca14d532..408a5ac63 100644 --- a/science/gungho/source/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod.F90 +++ b/science/gungho/source/kernel/core_dynamics/compute_coriolis_matrix_kernel_mod.F90 @@ -27,14 +27,16 @@ module compute_coriolis_matrix_kernel_mod GH_BASIS, GH_DIFF_BASIS, & CELL_COLUMN, GH_QUADRATURE_XYoZ use fs_continuity_mod, only: W2 - use sci_coordinate_jacobian_mod, only: coordinate_jacobian -use base_mesh_config_mod, only: geometry, & - geometry_spherical use rotation_vector_mod, only: rotation_vector_fplane, & rotation_vector_sphere use cross_product_mod, only: cross_product +use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical +use finite_element_config_mod, only: coord_system +use planet_config_mod, only: scaled_radius + implicit none private @@ -167,8 +169,10 @@ subroutine compute_coriolis_matrix_code(cell, nlayers, ncell_3d, & end if ! Calculate the Jacobian and its determinant - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & - chi_1_e, chi_2_e, chi_3_e, ipanel, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & + chi_1_e, chi_2_e, chi_3_e, ipanel, & basis_chi, diff_basis_chi, jac, dj) diff --git a/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 index 45f91bcf4..550cbda86 100644 --- a/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 +++ b/science/gungho/source/kernel/core_dynamics/compute_dl_matrix_kernel_mod.F90 @@ -20,15 +20,19 @@ module compute_dl_matrix_kernel_mod GH_BASIS, GH_DIFF_BASIS, & GH_SCALAR, GH_INTEGER, & CELL_COLUMN, GH_QUADRATURE_XYoZ - use base_mesh_config_mod, only: geometry, geometry_spherical use constants_mod, only: i_def, r_def, r_second, & PI, degrees_to_radians use sci_chi_transform_mod, only: chi2llr - use damping_layer_config_mod, only: dl_type, dl_type_latitude use fs_continuity_mod, only: W2 use kernel_mod, only: kernel_type use sci_coordinate_jacobian_mod, only: coordinate_jacobian + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical + use damping_layer_config_mod, only: dl_type, dl_type_latitude + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -213,7 +217,8 @@ subroutine compute_dl_matrix_code(cell, nlayers, ncell_3d, & chi2_e(df) = chi2(map_chi(df) + k - 1) chi3_e(df) = chi3(map_chi(df) + k - 1) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jac, dj) ik = k + (cell-1)*nlayers diff --git a/science/gungho/source/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod.F90 b/science/gungho/source/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod.F90 deleted file mode 100644 index dff2de0b4..000000000 --- a/science/gungho/source/kernel/core_dynamics/compute_vert_coriolis_matrix_kernel_mod.F90 +++ /dev/null @@ -1,215 +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. -!----------------------------------------------------------------------------- - -!> @brief Compute the vertical part of the Coriolis operator to apply the -!! rotation vector Omega to the wind fields, leaving only the vertical -!! component in Wtheta. -!> @details The form of vertical component of the Coriolis operator is: -!! \f[ < w, k . (2\Omega \times u) > \f] where w is the test function -!! in Wtheta, u corresponds to the wind field in W2 to which this -!! operator will be applied, k is the vertical unit vector and -!! Omega is the rotation vector of the domain. -!! Multiplying this operator by a wind field will assemble the weak -!! form of the vertical part of the Coriolis term. - -module compute_vert_coriolis_matrix_kernel_mod - -use constants_mod, only: i_def, r_def -use kernel_mod, only: kernel_type -use argument_mod, only: arg_type, func_type, & - GH_OPERATOR, GH_FIELD, & - GH_READ, GH_WRITE, & - GH_REAL, GH_SCALAR, & - ANY_SPACE_9, & - ANY_DISCONTINUOUS_SPACE_3, & - GH_BASIS, GH_DIFF_BASIS, & - CELL_COLUMN, GH_QUADRATURE_XYoZ -use fs_continuity_mod, only: W2, Wtheta - -use sci_coordinate_jacobian_mod, only: coordinate_jacobian -use base_mesh_config_mod, only: geometry, & - geometry_spherical -use rotation_vector_mod, only: rotation_vector_fplane, & - rotation_vector_sphere, & - vert_vector_sphere -use cross_product_mod, only: cross_product - -implicit none -private - -!------------------------------------------------------------------------------- -! Public types -!------------------------------------------------------------------------------- - -type, public, extends(kernel_type) :: compute_vert_coriolis_matrix_kernel_type - private - type(arg_type) :: meta_args(5) = (/ & - arg_type(GH_OPERATOR, GH_REAL, GH_WRITE, Wtheta, W2), & - arg_type(GH_FIELD*3, GH_REAL, GH_READ, ANY_SPACE_9), & - arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_3), & - arg_type(GH_SCALAR, GH_REAL, GH_READ), & - arg_type(GH_SCALAR, GH_REAL, GH_READ) & - /) - type(func_type) :: meta_funcs(3) = (/ & - func_type(Wtheta, GH_BASIS), & - func_type(W2, GH_BASIS), & - func_type(ANY_SPACE_9, GH_BASIS, GH_DIFF_BASIS) & - /) - integer :: operates_on = CELL_COLUMN - integer :: gh_shape = GH_QUADRATURE_XYoZ -contains - procedure, nopass :: compute_vert_coriolis_matrix_code -end type - -!------------------------------------------------------------------------------- -! Contained functions/subroutines -!------------------------------------------------------------------------------- -public :: compute_vert_coriolis_matrix_code -contains - -!> @brief Compute the vertical part of the Coriolis operator to apply the -!> rotation vector Omega to the wind fields, leaving only the vertical -!> component in Wtheta. -!> @param[in] col_idx Index of column -!> @param[in] nlayers Number of layers in mesh -!> @param[in] ncell_3d Total number of 3D cells in mesh -!> @param[in,out] matrix Vertical Coriolis operator -!> @param[in] chi_1 1st coordinate field -!> @param[in] chi_2 2nd coordinate field -!> @param[in] chi_3 3rd coordinate field -!> @param[in] panel_id A field giving the ID for mesh panels -!> @param[in] omega Planet angular velocity -!> @param[in] f_lat F-plane latitude -!> @param[in] ndf_wt Num of DoFs per cell for Wtheta -!> @param[in] basis_wt Wtheta basis funcs evaluated at quad points -!> @param[in] ndf_w2 Num of DoFs per cell for W2 -!> @param[in] basis_w2 W2 basis functions evaluated at quad points -!> @param[in] ndf_chi Num of DoFs per cell for Wchi -!> @param[in] undf_chi Num of DoFs in this partition for Wchi -!> @param[in] map_chi Dofmap for Wchi -!> @param[in] basis_chi Wchi basis functions evaluated at quad points -!> @param[in] diff_basis_chi Wchi differential basis funcs at quad points -!> @param[in] ndf_chi Num of DoFs per cell for Wchi -!> @param[in] undf_chi Num of DoFs in this partition for Wchi -!> @param[in] map_chi Dofmap for Wchi -!> @param[in] nqp_h Number of horizontal quadrature points -!> @param[in] nqp_v Number of vertical quadrature points -!> @param[in] wqp_h Horizontal quadrature weights -!> @param[in] wqp_v Vertical quadrature weights -subroutine compute_vert_coriolis_matrix_code(col_idx, nlayers, ncell_3d, & - matrix, & - chi_1, chi_2, chi_3, & - panel_id, & - omega, f_lat, & - ndf_wt, basis_wt, & - ndf_w2, basis_w2, & - ndf_chi, undf_chi, & - map_chi, & - basis_chi, diff_basis_chi, & - ndf_pid, undf_pid, map_pid, & - nqp_h, nqp_v, wqp_h, wqp_v) - - implicit none - - ! Arguments - integer(kind=i_def), intent(in) :: col_idx, ndf_pid, ndf_chi - integer(kind=i_def), intent(in) :: undf_pid, undf_chi - integer(kind=i_def), intent(in) :: ndf_wt, ndf_w2 - integer(kind=i_def), intent(in) :: nqp_h, nqp_v - integer(kind=i_def), intent(in) :: nlayers - integer(kind=i_def), intent(in) :: ncell_3d - - real(kind=r_def), intent(in) :: basis_w2(3,ndf_w2,nqp_h,nqp_v) - real(kind=r_def), intent(in) :: basis_wt(1,ndf_wt,nqp_h,nqp_v) - real(kind=r_def), intent(in) :: basis_chi(1,ndf_chi,nqp_h,nqp_v) - real(kind=r_def), intent(in) :: diff_basis_chi(3,ndf_chi,nqp_h,nqp_v) - - integer(kind=i_def), intent(in) :: map_chi(ndf_chi) - integer(kind=i_def), intent(in) :: map_pid(ndf_pid) - real(kind=r_def), intent(inout) :: matrix(ncell_3d,ndf_wt,ndf_w2) - real(kind=r_def), intent(in) :: chi_1(undf_chi) - real(kind=r_def), intent(in) :: chi_2(undf_chi) - real(kind=r_def), intent(in) :: chi_3(undf_chi) - real(kind=r_def), intent(in) :: panel_id(undf_pid) - real(kind=r_def), intent(in) :: wqp_h(nqp_h) - real(kind=r_def), intent(in) :: wqp_v(nqp_v) - real(kind=r_def), intent(in) :: omega - real(kind=r_def), intent(in) :: f_lat - - ! Internal variables - integer(kind=i_def) :: df_wt, df_w2, df_chi, k, ik - integer(kind=i_def) :: qp1, qp2 - - real(kind=r_def) :: chi_1_e(ndf_chi), chi_2_e(ndf_chi), chi_3_e(ndf_chi) - real(kind=r_def) :: dj(nqp_h,nqp_v) - real(kind=r_def) :: jac(3,3,nqp_h,nqp_v) - real(kind=r_def) :: rotation_vector(3,nqp_h,nqp_v) - real(kind=r_def) :: vert_vec(3,nqp_h,nqp_v) - real(kind=r_def) :: k_dot_omega_cross_u - real(kind=r_def) :: jac_u(3) - - integer(kind=i_def) :: ipanel - - ipanel = int(panel_id(map_pid(1)), i_def) - - ! Loop over layers: Start from 1 as in this loop k is not an offset - do k = 1, nlayers - ! Extract the coordinates for this cell - do df_chi = 1, ndf_chi - chi_1_e(df_chi) = chi_1(map_chi(df_chi) + k - 1) - chi_2_e(df_chi) = chi_2(map_chi(df_chi) + k - 1) - chi_3_e(df_chi) = chi_3(map_chi(df_chi) + k - 1) - end do - - ! Calculate planet's rotation vector and the vertical vector - if ( geometry == geometry_spherical ) then - call rotation_vector_sphere(ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, & - chi_3_e, ipanel, basis_chi, rotation_vector) - call vert_vector_sphere(ndf_chi, nqp_h, nqp_v, chi_1_e, chi_2_e, & - chi_3_e, ipanel, basis_chi, vert_vec) - else - call rotation_vector_fplane(nqp_h, nqp_v, omega, f_lat, rotation_vector) - do qp2 = 1, nqp_v - do qp1 = 1, nqp_h - vert_vec(:,qp1,qp2) = (/ 0.0_r_def, 0.0_r_def, 1.0_r_def /) - end do - end do - end if - - ! Calculate the Jacobian - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & - chi_1_e, chi_2_e, chi_3_e, ipanel, & - basis_chi, diff_basis_chi, jac, dj) - - ! To convert from reference space to physical space: - ! Let the volume element be dV and the unit volume be dV_hat, then: - ! w = w_hat, v = J v_hat/detJ, and dV = detJ dV_hat, - ! where hats denote the reference element space, J is the Jacobian, and - ! detJ its determinant. This gives: - ! \int w_hat * k . (2 Omega x J u_hat) dV_hat - ! Note that some of the detJ factors cancel - ik = k + (col_idx-1)*nlayers - matrix(ik,:,:) = 0.0_r_def - do qp2 = 1, nqp_v - do qp1 = 1, nqp_h - do df_w2 = 1, ndf_w2 - jac_u = matmul(jac(:,:,qp1,qp2), basis_w2(:,df_w2,qp1,qp2)) - k_dot_omega_cross_u = wqp_h(qp1) * wqp_v(qp2) * dot_product( & - vert_vec(:,qp1,qp2), & - cross_product(rotation_vector(:,qp1,qp2), jac_u) & - ) - do df_wt = 1, ndf_wt - matrix(ik,df_wt,df_w2) = matrix(ik,df_wt,df_w2) & - - basis_wt(1,df_wt,qp1,qp2) * k_dot_omega_cross_u - end do - end do - end do - end do - end do ! end of k loop - -end subroutine compute_vert_coriolis_matrix_code - -end module compute_vert_coriolis_matrix_kernel_mod From 93d059dbd5a784cd5a2977dac897960da711e2dc Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Wed, 4 Mar 2026 13:28:33 +0000 Subject: [PATCH 14/14] Update versions from main with local changes --- .../rose-meta/lfric-adjoint_tests/versions.py | 173 +--------------- .../rose-meta/lfric-gravity_wave/versions.py | 150 +------------- .../rose-meta/lfric-gungho_model/versions.py | 150 +------------- .../rose-meta/jedi_common/versions.py | 189 +---------------- .../rose-meta/jedi_forecast/versions.py | 190 +----------------- .../jedi_forecast_pseudo/versions.py | 190 +----------------- .../rose-meta/jedi_id_tlm_tests/versions.py | 190 +----------------- .../rose-meta/jedi_lfric_tests/versions.py | 190 +----------------- .../jedi_tlm_forecast_tl/versions.py | 190 +----------------- .../rose-meta/jedi_tlm_tests/versions.py | 190 +----------------- .../jules/rose-meta/lfric-jules/versions.py | 150 +------------- .../rose-meta/lfric-lfric2lfric/versions.py | 172 +--------------- .../rose-meta/lfric-lfric_atm/versions.py | 150 +------------- .../rose-meta/lfric-lfric_coupled/versions.py | 150 +------------- .../rose-meta/lfric-linear_model/versions.py | 173 +--------------- .../lfric-name_transport/versions.py | 150 +------------- .../ngarch/rose-meta/lfric-ngarch/versions.py | 150 +------------- .../rose-meta/lfric-shallow_water/versions.py | 150 +------------- .../solver/rose-meta/lfric-solver/versions.py | 4 +- .../rose-meta/lfric-transport/versions.py | 150 +------------- .../rose-meta/coupling/versions.py | 147 +------------- .../jedi_lfric_interface/versions.py | 173 +--------------- .../rose-meta/jules-lfric/versions.py | 88 +------- .../rose-meta/jules-lsm/versions.py | 85 +------- .../rose-meta/um-aerosol/versions.py | 4 +- .../rose-meta/um-boundary_layer/versions.py | 4 +- .../rose-meta/um-chemistry/versions.py | 4 +- .../rose-meta/um-cloud/versions.py | 4 +- .../rose-meta/um-convection/versions.py | 4 +- .../rose-meta/um-iau/versions.py | 4 +- .../rose-meta/um-microphysics/versions.py | 4 +- .../rose-meta/um-orographic_drag/versions.py | 4 +- .../rose-meta/um-spectral_gwd/versions.py | 4 +- .../um-stochastic_physics/versions.py | 4 +- .../rose-meta/socrates-radiation/versions.py | 18 +- .../rose-meta/lfric-adjoint/versions.py | 173 +--------------- .../gungho/rose-meta/lfric-gungho/versions.py | 147 ++------------ 37 files changed, 159 insertions(+), 3913 deletions(-) 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 9d1171b55..bdede0c07 100644 --- a/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py +++ b/applications/adjoint_tests/rose-meta/lfric-adjoint_tests/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,173 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 67176db29..bdede0c07 100644 --- a/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py +++ b/applications/gravity_wave/rose-meta/lfric-gravity_wave/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,150 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 67176db29..bdede0c07 100644 --- a/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py +++ b/applications/gungho_model/rose-meta/lfric-gungho_model/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,150 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 8a947131f..bdede0c07 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_common/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -21,196 +20,24 @@ 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 vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 23cc598fe..bdede0c07 100644 --- a/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py +++ b/applications/jedi_lfric_tests/rose-meta/jedi_forecast/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,190 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 4573ea0bd..bdede0c07 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 @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,190 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 23cc598fe..bdede0c07 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 @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,190 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 1ba18ec3c..bdede0c07 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 @@ -1,9 +1,8 @@ - re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,190 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 23cc598fe..bdede0c07 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 @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,190 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 23cc598fe..bdede0c07 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 @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,190 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t132(MacroUpgrade): - """Upgrade macro for ticket #132 by Tom Hill.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t132" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jedi_common - self.add_setting( - config, - ["namelist:jedi_lfric_settings", "adjoint_test_tolerance"], - "1.0e-4", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t132" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm diff --git a/applications/jules/rose-meta/lfric-jules/versions.py b/applications/jules/rose-meta/lfric-jules/versions.py index 67176db29..bdede0c07 100644 --- a/applications/jules/rose-meta/lfric-jules/versions.py +++ b/applications/jules/rose-meta/lfric-jules/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,150 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm diff --git a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py index 6bd89dfa2..bdede0c07 100644 --- a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -21,179 +20,24 @@ 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 vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - return config, self.reports - - -class vn30_t48(MacroUpgrade): - """Upgrade macro for ticket #48 by Juan M Castillo.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t48" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric2lfric - self.add_setting(config, ["namelist:lfric2lfric", "mode"], "'ics'") - self.add_setting( - config, - ["namelist:lfric2lfric", "source_file_lbc"], - "'source_file_lbc'", - ) - self.add_setting( - config, - ["namelist:lfric2lfric", "weight_file_lbc"], - "'weight_file_lbc'", - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t48" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 67176db29..bdede0c07 100644 --- a/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py +++ b/applications/lfric_atm/rose-meta/lfric-lfric_atm/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,150 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 67176db29..bdede0c07 100644 --- a/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py +++ b/applications/lfric_coupled/rose-meta/lfric-lfric_coupled/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,150 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 9d1171b55..bdede0c07 100644 --- a/applications/linear_model/rose-meta/lfric-linear_model/versions.py +++ b/applications/linear_model/rose-meta/lfric-linear_model/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,173 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 67176db29..bdede0c07 100644 --- a/applications/name_transport/rose-meta/lfric-name_transport/versions.py +++ b/applications/name_transport/rose-meta/lfric-name_transport/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,150 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm diff --git a/applications/ngarch/rose-meta/lfric-ngarch/versions.py b/applications/ngarch/rose-meta/lfric-ngarch/versions.py index 67176db29..bdede0c07 100644 --- a/applications/ngarch/rose-meta/lfric-ngarch/versions.py +++ b/applications/ngarch/rose-meta/lfric-ngarch/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,150 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 67176db29..bdede0c07 100644 --- a/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py +++ b/applications/shallow_water/rose-meta/lfric-shallow_water/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,150 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm diff --git a/applications/solver/rose-meta/lfric-solver/versions.py b/applications/solver/rose-meta/lfric-solver/versions.py index 152c043d0..01798ad2b 100644 --- a/applications/solver/rose-meta/lfric-solver/versions.py +++ b/applications/solver/rose-meta/lfric-solver/versions.py @@ -1,8 +1,8 @@ import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): diff --git a/applications/transport/rose-meta/lfric-transport/versions.py b/applications/transport/rose-meta/lfric-transport/versions.py index 67176db29..bdede0c07 100644 --- a/applications/transport/rose-meta/lfric-transport/versions.py +++ b/applications/transport/rose-meta/lfric-transport/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,150 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm diff --git a/interfaces/coupled_interface/rose-meta/coupling/versions.py b/interfaces/coupled_interface/rose-meta/coupling/versions.py index 67176db29..ba2470e70 100644 --- a/interfaces/coupled_interface/rose-meta/coupling/versions.py +++ b/interfaces/coupled_interface/rose-meta/coupling/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,150 +33,12 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - class vn30_t99(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm 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 9d1171b55..bdede0c07 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 @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,173 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm diff --git a/interfaces/jules_interface/rose-meta/jules-lfric/versions.py b/interfaces/jules_interface/rose-meta/jules-lfric/versions.py index 329bfc2bc..01798ad2b 100644 --- a/interfaces/jules_interface/rose-meta/jules-lfric/versions.py +++ b/interfaces/jules_interface/rose-meta/jules-lfric/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -21,91 +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 vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - 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 4a4ab583f..01798ad2b 100644 --- a/interfaces/jules_interface/rose-meta/jules-lsm/versions.py +++ b/interfaces/jules_interface/rose-meta/jules-lsm/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -32,83 +31,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - 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 152c043d0..01798ad2b 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-aerosol/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-aerosol/versions.py @@ -1,8 +1,8 @@ import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): 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 152c043d0..01798ad2b 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 @@ -1,8 +1,8 @@ import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): 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 152c043d0..01798ad2b 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-chemistry/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-chemistry/versions.py @@ -1,8 +1,8 @@ import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): 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 152c043d0..01798ad2b 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-cloud/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-cloud/versions.py @@ -1,8 +1,8 @@ import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): 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 152c043d0..01798ad2b 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-convection/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-convection/versions.py @@ -1,8 +1,8 @@ import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): 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 152c043d0..01798ad2b 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-iau/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-iau/versions.py @@ -1,8 +1,8 @@ import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): 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 152c043d0..01798ad2b 100644 --- a/interfaces/physics_schemes_interface/rose-meta/um-microphysics/versions.py +++ b/interfaces/physics_schemes_interface/rose-meta/um-microphysics/versions.py @@ -1,8 +1,8 @@ import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): 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 152c043d0..01798ad2b 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 @@ -1,8 +1,8 @@ import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): 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 152c043d0..01798ad2b 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 @@ -1,8 +1,8 @@ import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): 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 152c043d0..01798ad2b 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 @@ -1,8 +1,8 @@ import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): diff --git a/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py b/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py index ce7195ecd..889213309 100644 --- a/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py +++ b/interfaces/socrates_interface/rose-meta/socrates-radiation/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -29,16 +28,3 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - 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 9d1171b55..bdede0c07 100644 --- a/science/adjoint/rose-meta/lfric-adjoint/versions.py +++ b/science/adjoint/rose-meta/lfric-adjoint/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -34,173 +33,11 @@ def upgrade(self, config, meta_config=None): """ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" - - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - - return config, self.reports - - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - - return config, self.reports - - -class vn30_t108(MacroUpgrade): - """Upgrade macro for ticket #108 by Christine Johnson.""" - - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t108" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-linear - fixed_ls = self.get_setting_value( - config, ["namelist:linear", "fixed_ls"] - ) - if ".true." in fixed_ls: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".true." - ) - else: - self.add_setting( - config, ["namelist:linear", "transport_efficiency"], ".false." - ) - - return config, self.reports - - -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t108" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm diff --git a/science/gungho/rose-meta/lfric-gungho/versions.py b/science/gungho/rose-meta/lfric-gungho/versions.py index 0cfcacc05..bdede0c07 100644 --- a/science/gungho/rose-meta/lfric-gungho/versions.py +++ b/science/gungho/rose-meta/lfric-gungho/versions.py @@ -1,9 +1,8 @@ -import re import sys -from metomi.rose.upgrade import MacroUpgrade +from metomi.rose.upgrade import MacroUpgrade # noqa: F401 -from .version22_30 import * +from .version30_31 import * class UpgradeError(Exception): @@ -19,146 +18,26 @@ def __repr__(self): __str__ = __repr__ -class vn30_t99(MacroUpgrade): - """Upgrade macro for ticket #99 by Fred Wobus.""" +""" +Copy this template and complete to add your macro - BEFORE_TAG = "vn3.0" - AFTER_TAG = "vn3.0_t99" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-lfric_atm - """Set segmentation size for Gregory-Rowntree convection kernel""" - self.add_setting(config, ["namelist:physics", "conv_gr_segment"], "16") - return config, self.reports +class vnXX_txxx(MacroUpgrade): + # Upgrade macro for by - -class vn30_t146(MacroUpgrade): - """Upgrade macro for ticket #146 by Maggie Hendry.""" - - BEFORE_TAG = "vn3.0_t99" - AFTER_TAG = "vn3.0_t146" + BEFORE_TAG = "vnX.X" + AFTER_TAG = "vnX.X_txxx" def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/jules-lfric - # Add jules_model_environment_lfric namelist - source = self.get_setting_value( - config, ["file:configuration.nml", "source"] - ) - source = re.sub( - r"namelist:jules_hydrology", - r"namelist:jules_hydrology)" - + "\n" - + " (namelist:jules_model_environment_lfric", - source, - ) - self.change_setting_value( - config, ["file:configuration.nml", "source"], source - ) - self.add_setting( - config, - ["namelist:jules_model_environment_lfric", "l_jules_parent"], - "'lfric'", - ) - # Add jules_surface namelist items - self.add_setting( - config, - ["namelist:jules_surface", "all_tiles"], - "'off'", - ) - self.add_setting(config, ["namelist:jules_surface", "beta1"], "0.83") - self.add_setting(config, ["namelist:jules_surface", "beta2"], "0.93") - self.add_setting( - config, ["namelist:jules_surface", "beta_cnv_bl"], "0.04" - ) - self.add_setting( - config, - ["namelist:jules_surface", "fd_hill_option"], - "'capped_lowhill'", - ) - self.add_setting(config, ["namelist:jules_surface", "fwe_c3"], "0.5") - self.add_setting( - config, ["namelist:jules_surface", "fwe_c4"], "20000.0" - ) - self.add_setting(config, ["namelist:jules_surface", "hleaf"], "5.7e4") - self.add_setting(config, ["namelist:jules_surface", "hwood"], "1.1e4") - self.add_setting( - config, ["namelist:jules_surface", "i_modiscopt"], "'on'" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_epot_corr"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_land_ice_imp"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_mo_buoyancy_calc"], ".true." - ) - self.add_setting( - config, ["namelist:jules_surface", "orog_drag_param"], "0.15" - ) - self.add_setting( - config, ["namelist:jules_surface", "l_flake_model"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_land_ice"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_elev_lw_down"], ".false." - ) - self.add_setting( - config, ["namelist:jules_surface", "l_point_data"], ".false." - ) - return config, self.reports - - -class vn30_t135(MacroUpgrade): - """Upgrade macro for ticket #135 by James Manners.""" - - BEFORE_TAG = "vn3.0_t146" - AFTER_TAG = "vn3.0_t135" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/socrates-radiation - self.add_setting(config, ["namelist:cosp", "n_cosp_step"], "1") - return config, self.reports - - -class vn30_t171(MacroUpgrade): - """Upgrade macro for ticket #171 by James Kent.""" - - BEFORE_TAG = "vn3.0_t135" - AFTER_TAG = "vn3.0_t171" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - # Add adjust_tracer_equation to transport namelist - self.add_setting( - config, ["namelist:transport", "adjust_tracer_equation"], ".false." - ) - return config, self.reports - - -class vn30_t214(MacroUpgrade): - """Upgrade macro for ticket #214 by mark Hedley.""" - - BEFORE_TAG = "vn3.0_t171" - AFTER_TAG = "vn3.0_t214" - - def upgrade(self, config, meta_config=None): - # Commands From: rose-meta/lfric-gungho - """Set segments configuration to true.""" - self.change_setting_value( - config, ["namelist:physics", "configure_segments"], ".true." - ) - + # Add settings return config, self.reports +""" -class vn30_t99(MacroUpgrade): +class vn31_t221(MacroUpgrade): """Upgrade macro for ticket #221 by Benjamin Went.""" - BEFORE_TAG = "vn3.0_t214" - AFTER_TAG = "vn3.0_t221" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t221" def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-lfric_atm