Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ casim:
ref: 2026.07.1

jules:
source: git@github.com:MetOffice/jules.git
ref: 2026.07.1
source: git@github.com:maggiehendry/jules.git
ref: 115-convert-jules_pftparm-to-a-duplicate-namelist

lfric_apps:
source:
Expand Down
10 changes: 10 additions & 0 deletions interfaces/jules_interface/rose-meta/jules-lsm/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,13 @@ def upgrade(self, config, meta_config=None):
# Add settings
return config, self.reports
"""

class vn32_t775(MacroUpgrade):
# Upgrade macro for 775 by Maggie Hendry

BEFORE_TAG = "vn3.2"
AFTER_TAG = "vn3.2_t775"

def upgrade(self, config, meta_config=None):
# Bump tag to pick up metadata changes
return config, self.reports
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ subroutine jules_pftparm_init(config)
psi_open, q10_leaf, r_grow, rootd_ft, sigl, sox_a, sox_p50, sox_rp_min, &
sug_g0, sug_grec, sug_yg, tef, tleaf_of, tlow, tupp, vint, vsl, z0v

use pftparm, only: pftparm_alloc, print_nlist_jules_pftparm, &
check_jules_pftparm

use jules_pftparm_nml_iterator_mod, only: jules_pftparm_nml_iterator_type
use jules_pftparm_nml_mod, only: jules_pftparm_nml_type
use jules_surface_types_mod, only: npft, brd_leaf, ndl_leaf, c3_grass, &
c4_grass, shrub
use jules_surface_types_mod, only: npft, map_nml_instance_to_tile_number


use log_mod, only: log_event, log_scratch_space, log_level_error

Expand All @@ -59,42 +62,15 @@ subroutine jules_pftparm_init(config)

character(len=*), parameter :: RoutineName='JULES_PFTPARM_INIT'

call pftparm_alloc(npft)

n = 0
call iter%initialise( config%jules_pftparm )
do while ( iter%has_next() )
n = n + 1
jules_pftparm => iter%next()
! For now add mapping from instance to jules_surface_types
select case ( trim( jules_pftparm%pft_name_io() ) )
case ( 'brd_leaf' )
i = brd_leaf
case ( 'ndl_leaf' )
i = ndl_leaf
case ( 'c3_grass' )
i = c3_grass
case ( 'c4_grass' )
i = c4_grass
case ( 'shrub' )
i = shrub
case DEFAULT
write(log_scratch_space,'(A)') &
'PFT name not recognised: ' // jules_pftparm%pft_name_io()
call log_event( &
RoutineName//': '//trim(log_scratch_space), log_level_error &
)
end select

! Range of specified types (1:npft) checked by check_jules_surface_types
if ( i < 1 ) then
write(log_scratch_space,'(A)') &
'jules_pftparm and jules_surface_types inputs are inconsistent; '// &
trim(jules_pftparm%pft_name_io()) // &
' is not specified in jules_surface_types'
call log_event( &
RoutineName//': '//trim(log_scratch_space), log_level_error &
)
end if

i = map_nml_instance_to_tile_number ( 'jules_pftparm', &
jules_pftparm%pft_name_io() )
! c3_io would make more sense as a logical
! (see MetOffice/jules/issues/106)
select case ( jules_pftparm%c3_io() )
Expand Down Expand Up @@ -236,6 +212,9 @@ subroutine jules_pftparm_init(config)
)
end if

call print_nlist_jules_pftparm()
call check_jules_pftparm()

end subroutine jules_pftparm_init

end module jules_pftparm_init_mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ module jules_physics_init_mod
use jules_irrig_mod, only: irrig_vars_alloc
use metstats_mod, only: metstats_allocate
use nvegparm, only: nvegparm_alloc
use pftparm, only: pftparm_alloc
use trif, only: trif_alloc
use veg3_parm_mod, only: veg3_parm_allocate
use veg3_field_mod, only: veg3_field_allocate
Expand Down Expand Up @@ -177,8 +176,6 @@ subroutine jules_physics_init(config)
albsnc_nvg, albsnf_nvgu, albsnf_nvg, albsnf_nvgl, catch_nvg, &
ch_nvg, emis_nvg, gs_nvg, infil_nvg, vf_nvg, z0_nvg, &
check_jules_nvegparm, print_nlist_jules_nvegparm
use pftparm, only: &
print_nlist_jules_pftparm, check_jules_pftparm
use jules_pftparm_init_mod, only: jules_pftparm_init

use check_compatible_options_mod, only: check_compatible_options
Expand Down Expand Up @@ -598,8 +595,6 @@ subroutine jules_physics_init(config)

call nvegparm_alloc(nnvg)

call pftparm_alloc(npft)

call trif_alloc(npft, l_triffid, l_phenol)

call veg3_parm_allocate(land_pts,nsurft,nnpft,npft)
Expand Down Expand Up @@ -654,12 +649,10 @@ subroutine jules_physics_init(config)
! Settings which are specified on all surface tiles at once
! - contained in module c_z0h_z0m
! ----------------------------------------------------------------
call print_nlist_jules_pftparm()
call print_nlist_jules_nvegparm()
call c_z0h_z0m_print()

! This routine checks that the options set are actually compatible
call check_jules_pftparm(npft,nnpft)
call check_jules_nvegparm(nnvg)
call c_z0h_z0m_check(ntype)
call check_compatible_options()
Expand Down
Loading