Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
352a57d
Copied in all source from the fcm branch
MichaelWhitall Feb 2, 2026
9358789
Merging in changes from git_migration tag
MichaelWhitall Feb 2, 2026
c4e4607
Merge branch 'vn3.0_comorph_refact' of github.com:MichaelWhitall/lfri…
MichaelWhitall Feb 2, 2026
564b6b7
Added myself to the contributors.md file.
MichaelWhitall Feb 25, 2026
b1491d7
Sync with the vn2.2 branch (changed spelling of "haloes" to "halos").
MichaelWhitall Feb 25, 2026
abbf801
Sync with the vn2.2 branch (changed spelling of "haloes" to "halos").
MichaelWhitall Feb 25, 2026
eb7b81b
Sync with the vn2.2 branch.
MichaelWhitall Feb 26, 2026
2529025
Sync with the vn2.2 branch.
MichaelWhitall Feb 26, 2026
c1e7b1b
Sync with the vn2.2 branch.
MichaelWhitall Feb 26, 2026
3d53b0c
Main to Stable 2026.03.1 (#315)
james-bruten-mo Mar 3, 2026
728c024
Merged in latest release of stable, vn3.1, and fixed conflict in cont…
MichaelWhitall Mar 4, 2026
ab18bda
Deleted spurious line accidentally added at the bottom of contributor…
MichaelWhitall Mar 4, 2026
55457b5
Sync with the vn2.2 branch (fix compiler warnings, remove UM-isms in …
MichaelWhitall Mar 4, 2026
0eb670a
Sync with the vn2.2 branch (fix compiler warnings, remove UM-isms in …
MichaelWhitall Mar 4, 2026
f99c309
Upgrading comorph_refact to vn3.1
MichaelWhitall Mar 4, 2026
2dee261
Sync with the vn2.2 branch (fix compiler warnings, remove UM-isms in …
MichaelWhitall Mar 4, 2026
cb9366e
Fixed comment typos spotted at sci/tech review.
MichaelWhitall Mar 4, 2026
98d805f
Fixed comment typos spotted at sci/tech review.
MichaelWhitall Mar 4, 2026
0ac2179
Fixed comment typos spotted at sci/tech review.
MichaelWhitall Mar 4, 2026
7e2bfa6
Fixed comment typos spotted at sci/tech review.
MichaelWhitall Mar 4, 2026
c8082a1
Corrected username in CONTRIBUTORS.md (case-sensitive).
MichaelWhitall Mar 5, 2026
e421755
Deleted various unused things accidentally left in the branch. Also …
MichaelWhitall Mar 5, 2026
54ab8f2
Deleted various unused things accidentally left in the branch. Also …
MichaelWhitall Mar 5, 2026
7fe2108
Deleted various unused things accidentally left in the branch. Also …
MichaelWhitall Mar 5, 2026
f87cecf
Deleted various unused things accidentally left in the branch. Also …
MichaelWhitall Mar 5, 2026
fca881d
Lower-case missed instance of .TRUE.
MichaelWhitall Mar 5, 2026
6a59e93
Lower-case missed instance of .TRUE.
MichaelWhitall Mar 5, 2026
44e8494
Lower-case missed instance of .TRUE.
MichaelWhitall Mar 5, 2026
b239f67
Lower-case missed instance of .TRUE.
MichaelWhitall Mar 5, 2026
b5351da
Delete accidentally-add pycache files (leftover by rose-stem?)
MichaelWhitall Mar 5, 2026
fe1e8d9
Delete accidentally-add pycache files (leftover by rose-stem?)
MichaelWhitall Mar 5, 2026
bbe5347
Delete accidentally-add pycache files (leftover by rose-stem?)
MichaelWhitall Mar 5, 2026
a2b5b7d
Delete accidentally-add pycache files (leftover by rose-stem?)
MichaelWhitall Mar 5, 2026
8515add
Deleted unused l_cf_conv_buoy switch, corrected comment in set_det.
MichaelWhitall Mar 6, 2026
df78159
Deleted unused l_cf_conv_buoy switch, corrected comment in set_det.
MichaelWhitall Mar 6, 2026
f59f41c
Deleted unused l_cf_conv_buoy switch, corrected comment in set_det.
MichaelWhitall Mar 6, 2026
0c75aa8
Deleted unused l_cf_conv_buoy switch, corrected comment in set_det.
MichaelWhitall Mar 6, 2026
6aa14cb
Improved comment Re handling of delta_tv in init_sublevs.
MichaelWhitall Mar 11, 2026
2ada9c6
Improved comment Re handling of delta_tv in init_sublevs.
MichaelWhitall Mar 11, 2026
9f05607
Improved comment Re handling of delta_tv in init_sublevs.
MichaelWhitall Mar 11, 2026
8188cad
Improved comment Re handling of delta_tv in init_sublevs.
MichaelWhitall Mar 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions rose-stem/app/check_global_variables/file/dirtylist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ science/physics_schemes/source/convection/comorph/control/comorph_constants_mod.
science/physics_schemes/source/convection/comorph/control/fields_type_mod.F90
science/physics_schemes/source/convection/comorph/control/cloudfracs_type_mod.F90
science/physics_schemes/source/convection/comorph/control/fields_2d_mod.F90
science/physics_schemes/source/convection/comorph/control/parcel_type_mod.F90
science/physics_schemes/source/convection/comorph/control/res_source_type_mod.F90
science/physics_schemes/source/convection/comorph/plume_model/sublevs_mod.F90
science/physics_schemes/source/convection/comorph/interface/standalone/qsat_data.F90
science/physics_schemes/source/convection/comorph/interface/um/comorph_diags_scm_mod.F90
science/physics_schemes/source/convection/cv_dependent_switch_mod.F90
science/physics_schemes/source/convection/cv_run_mod.F90
science/physics_schemes/source/convection/wtrac_conv.F90
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ contains
type( field_type ), pointer :: dtheta_stph => null()
type( field_type ), pointer :: dmv_stph => null()

type( field_type), pointer :: cca => null()
type( field_type), pointer :: ccw => null()

type( field_type ), pointer :: departure_exner_wth
#endif
type( field_type), pointer :: theta_star => null()
Expand Down Expand Up @@ -222,6 +225,14 @@ contains
evap_condense_done = .false.

#ifdef UM_PHYSICS

! Initialise convective cloud fields to zero
! (both comorph and implicit BL may update them only at some grid-points)
call convection_fields%get_field('cca', cca)
call convection_fields%get_field('ccw', ccw)
call invoke( setval_c(cca, 0.0_r_def), &
setval_c(ccw, 0.0_r_def) )

! Balance cloud before the rest of fast physics
if (cloud_call_b4_conv) then
call derived_fields%get_field('theta_star', theta_star)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ module add_res_source_mod

! Subroutine to add resolved-scale source terms for a given
! convective draft onto compressed copies of the full fields.
subroutine add_res_source( n_points_super, n_fields_tot, &
n_conv_types, n_conv_layers, &
subroutine add_res_source( n_points_super, n_points_res, n_fields_tot, &
ij_first, ij_last, index_ic_k, &
res_source_k, &
res_source_cmpr, res_source_super, &
res_source_fields, &
fields_k_super, layer_mass_k )

use comorph_constants_mod, only: real_cvprec, comorph_timestep, nx_full
use res_source_type_mod, only: res_source_type, i_ent, i_det
use comorph_constants_mod, only: real_cvprec, min_float, &
comorph_timestep, nx_full
use cmpr_type_mod, only: cmpr_type
use res_source_type_mod, only: n_res, i_ent, i_det

implicit none

! Max number of convective points on one level (dimensions super)
integer, intent(in) :: n_points_super
! Size of res_source arrays
integer, intent(in) :: n_points_res
! Total number of model-fields to update
integer, intent(in) :: n_fields_tot
! Number of convection types
integer, intent(in) :: n_conv_types
! Number of distinct convecting layers
integer, intent(in) :: n_conv_layers

! First and last ij-indices on the current segment
integer, intent(in) :: ij_first
Expand All @@ -42,9 +42,14 @@ subroutine add_res_source( n_points_super, n_fields_tot, &
! common array for referencing from res_source compression list
integer, intent(in) :: index_ic_k(ij_first:ij_last)

! Structure containing resolved-scale source terms to be added
type(res_source_type), intent(in) :: res_source_k &
( n_conv_types, n_conv_layers )
! Structure containing source term compression indices
type(cmpr_type), intent(in) :: res_source_cmpr

! Resolved-scale source term arrays to be added
real(kind=real_cvprec), intent(in) :: res_source_super &
( n_points_res, n_res )
real(kind=real_cvprec), intent(in) :: res_source_fields &
( n_points_res, n_fields_tot )

! Super-array containing fields to be incremented
real(kind=real_cvprec), intent(in out) :: fields_k_super &
Expand All @@ -58,47 +63,31 @@ subroutine add_res_source( n_points_super, n_fields_tot, &
integer :: ic_any( n_points_super )

! Loop counters
integer :: i_type, i_layr, i_field, i, j, ij, ic


! Loop over convecting layers and convection types
do i_layr = 1, n_conv_layers
do i_type = 1, n_conv_types

! If there are any resolved-scale source terms
! for this convection layer / type at the current level
if ( res_source_k(i_type,i_layr) % cmpr % n_points > 0 ) then

! Extract the cmpr_any compression list index from the grid
do ic = 1, res_source_k(i_type,i_layr) % cmpr % n_points
i = res_source_k(i_type,i_layr) % cmpr % index_i(ic)
j = res_source_k(i_type,i_layr) % cmpr % index_j(ic)
ij = nx_full*(j-1)+i
ic_any(ic) = index_ic_k(ij)
end do

! Increment the layer-mass with detrainment - entrainment
do ic = 1, res_source_k(i_type,i_layr) % cmpr % n_points
layer_mass_k(ic_any(ic)) = layer_mass_k(ic_any(ic)) &
+ ( res_source_k(i_type,i_layr) &
% res_super(ic,i_det) &
- res_source_k(i_type,i_layr) &
% res_super(ic,i_ent) &
) * comorph_timestep
end do

! Increment the primary fields with the source terms
do i_field = 1, n_fields_tot
do ic = 1, res_source_k(i_type,i_layr) % cmpr % n_points
fields_k_super(ic_any(ic),i_field) &
= fields_k_super(ic_any(ic),i_field) &
+ res_source_k(i_type,i_layr) &
% fields_super(ic,i_field) * comorph_timestep
end do
end do

end if
integer :: i_field, i, j, ij, ic


! Extract the cmpr_any compression list index from the grid
do ic = 1, res_source_cmpr % n_points
i = res_source_cmpr % index_i(ic)
j = res_source_cmpr % index_j(ic)
ij = nx_full*(j-1)+i
ic_any(ic) = index_ic_k(ij)
end do

! Increment the layer-mass with detrainment - entrainment
do ic = 1, res_source_cmpr % n_points
layer_mass_k(ic_any(ic)) = layer_mass_k(ic_any(ic)) &
+ ( res_source_super(ic,i_det) &
- res_source_super(ic,i_ent) &
) * comorph_timestep
end do

! Increment the primary fields with the source terms
do i_field = 1, n_fields_tot
do ic = 1, res_source_cmpr % n_points
fields_k_super(ic_any(ic),i_field) &
= fields_k_super(ic_any(ic),i_field) &
+ res_source_fields(ic,i_field) * comorph_timestep
end do
end do

Expand Down
Loading