Skip to content
Open
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
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
| ScottWales | Scott Wales | Bureau of Meteorology | 2026-02-16 |
| t00sa | Sam Clarke-Green | Met Office | 2026-02-27 |
| Pierre-siddall | Pierre Siddall| Met Office | 2026-02-06 |
| RichardEssery | Richard Essery | University of Edinburgh | 2026-04-18 |
9 changes: 9 additions & 0 deletions src/control/shared/fluxes.F90
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ MODULE fluxes_mod
! Surface FQW for sea-ice
REAL(KIND=real_jlslsm), ALLOCATABLE :: fsmc_pft(:,:)
! Moisture availability factor.
REAL(KIND=real_jlslsm), ALLOCATABLE :: fsnow(:,:)
! Snow cover fraction on tiles
REAL(KIND=real_jlslsm), ALLOCATABLE :: ftl_sicat(:,:,:)
! Surface FTL for sea-ice
REAL(KIND=real_jlslsm), ALLOCATABLE :: ftl_surft(:,:)
Expand Down Expand Up @@ -215,6 +217,8 @@ MODULE fluxes_mod
! Surface FQW for sea-ice
REAL(KIND=real_jlslsm), POINTER :: fsmc_pft(:,:)
! Moisture availability factor.
REAL(KIND=real_jlslsm), POINTER :: fsnow(:,:)
! Snow cover fraction on tiles
REAL(KIND=real_jlslsm), POINTER :: ftl_sicat(:,:,:)
! Surface FTL for sea-ice
REAL(KIND=real_jlslsm), POINTER :: ftl_surft(:,:)
Expand Down Expand Up @@ -340,6 +344,7 @@ SUBROUTINE fluxes_alloc(land_pts, t_i_length, t_j_length, &
ALLOCATE(fluxes_data%sub_surf_roff_gb(land_pts))
ALLOCATE(fluxes_data%surf_roff_gb(land_pts))
ALLOCATE(fluxes_data%alb_surft(land_pts,nsurft,4) )
ALLOCATE(fluxes_data%fsnow(land_pts,nsurft))
ALLOCATE(fluxes_data%tstar_ij(t_i_length,t_j_length))
ALLOCATE(fluxes_data%e_sea_ij(t_i_length,t_j_length))
ALLOCATE(fluxes_data%fsmc_pft(land_pts,npft))
Expand Down Expand Up @@ -383,6 +388,7 @@ SUBROUTINE fluxes_alloc(land_pts, t_i_length, t_j_length, &
fluxes_data%sub_surf_roff_gb(:) = 0.0
fluxes_data%surf_roff_gb(:) = 0.0
fluxes_data%alb_surft(:,:,:) = 0.0
fluxes_data%fsnow(:,:) = 0.0
fluxes_data%tstar_ij(:,:) = 0.0
fluxes_data%e_sea_ij(:,:) = 0.0
fluxes_data%fsmc_pft(:,:) = 0.0
Expand Down Expand Up @@ -459,6 +465,7 @@ SUBROUTINE fluxes_dealloc(fluxes_data)
DEALLOCATE(fluxes_data%sub_surf_roff_gb)
DEALLOCATE(fluxes_data%surf_roff_gb)
DEALLOCATE(fluxes_data%alb_surft)
DEALLOCATE(fluxes_data%fsnow)
DEALLOCATE(fluxes_data%tstar_ij)
DEALLOCATE(fluxes_data%e_sea_ij)
DEALLOCATE(fluxes_data%fsmc_pft)
Expand Down Expand Up @@ -541,6 +548,7 @@ SUBROUTINE fluxes_assoc(fluxes,fluxes_data)
fluxes%sub_surf_roff_gb => fluxes_data%sub_surf_roff_gb
fluxes%surf_roff_gb => fluxes_data%surf_roff_gb
fluxes%alb_surft => fluxes_data%alb_surft
fluxes%fsnow => fluxes_data%fsnow
fluxes%tstar_ij => fluxes_data%tstar_ij
fluxes%e_sea_ij => fluxes_data%e_sea_ij
fluxes%fsmc_pft => fluxes_data%fsmc_pft
Expand Down Expand Up @@ -619,6 +627,7 @@ SUBROUTINE fluxes_nullify(fluxes)
NULLIFY(fluxes%sub_surf_roff_gb)
NULLIFY(fluxes%surf_roff_gb)
NULLIFY(fluxes%alb_surft)
NULLIFY(fluxes%fsnow)
NULLIFY(fluxes%tstar_ij)
NULLIFY(fluxes%e_sea_ij)
NULLIFY(fluxes%fsmc_pft)
Expand Down
12 changes: 12 additions & 0 deletions src/control/shared/jules_radiation_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ SUBROUTINE check_jules_radiation()

USE ereport_mod, ONLY: ereport
USE jules_print_mgr, ONLY: jules_message
USE jules_snow_mod, ONLY: i_snow_tile

!-----------------------------------------------------------------------------
! Description:
Expand Down Expand Up @@ -157,6 +158,17 @@ SUBROUTINE check_jules_radiation()
CALL ereport("check_jules_radiation", errorstatus, jules_message)
END IF

! Required options if a separate snow tile is being used
IF ( ANY(i_snow_tile == 1) ) THEN
IF ( (.NOT. l_spec_albedo) .OR. l_embedded_snow .OR. &
(.NOT. l_snow_albedo) ) THEN
errorstatus = 1003
CALL ereport("check_jules_radiation", errorstatus, &
"l_spec_albedo = T, l_embedded_snow = F and l_snow_albedo = T" // &
"required if ANY i_snow_tile = 1")
END IF
END IF

!Can set the size of rad_nband
IF (l_spec_albedo) THEN
rad_nband = 2
Expand Down
29 changes: 27 additions & 2 deletions src/control/shared/jules_snow_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ MODULE jules_snow_mod
INTEGER :: &
i_snow_cond_parm = 0
! Parametrization scheme for snow conductivity

INTEGER :: &
i_snow_tile(nsurft_max)
! Tiles without (0) or with (1) separate energy balance
! for snow. Must be 0 on ice tiles
DATA i_snow_tile / nsurft_max * 0 /

!-----------------------------------------------------------------------------
! Parametrization of the rate of growth of snow grains
Expand Down Expand Up @@ -307,7 +313,7 @@ MODULE jules_snow_mod
NAMELIST / jules_snow/ &
! Switches
nsmax, l_snowdep_surf, l_rho_snow_corr, frac_snow_subl_melt, &
graupel_options, &
graupel_options,i_snow_tile, &
! Equitemperature metamorphism
l_et_metamorph, a_snow_et, b_snow_et, c_snow_et, rho_snow_et_crit, &
! Thermal conductivity of snow
Expand All @@ -333,7 +339,7 @@ SUBROUTINE check_jules_snow()

USE water_constants_mod, ONLY: tm

USE jules_surface_types_mod, ONLY: npft
USE jules_surface_types_mod, ONLY: ice, npft, ntype
USE jules_surface_mod, ONLY: l_aggregate
USE jules_vegetation_mod, ONLY: can_model

Expand Down Expand Up @@ -388,6 +394,25 @@ SUBROUTINE check_jules_snow()
END IF
END IF

! Check for inconsistencies if a separate snow tile is used
IF ( ANY(i_snow_tile == 1) ) THEN
! Tiles cannot be aggregated
IF ( l_aggregate ) THEN
CALL ereport(RoutineName, errorstatus, &
'l_aggregate = F required if ANY i_snow_tile = 1')
END IF
! The last surface type must be an ice tile
IF ( ice .NE. ntype ) THEN
CALL ereport(RoutineName, errorstatus, &
'ice = ntype required if ANY i_snow_tile = 1')
END IF
! The ice tile cannot be selected
IF ( i_snow_tile(ntype) == 1 ) THEN
CALL ereport(RoutineName, errorstatus, &
'i_snow_tile(ntype) = 1 is not permitted')
END IF
END IF

END SUBROUTINE check_jules_snow
#endif

Expand Down
10 changes: 6 additions & 4 deletions src/control/shared/surf_couple_explicit_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,8 @@ SUBROUTINE surf_couple_explicit( &
!IN soil/vegetation/land surface data :
ainfo%land_index,nsurft,sm_levels,progs%canopy_surft,psparms%catch_surft, &
psparms%catch_snow_surft, psparms%hcon_soilt,jules_vars%ho2r2_orog_gb, &
flandg_tmp, &
progs%snow_surft,jules_vars%sil_orog_land_gb,psparms%smvccl_soilt, &
flandg_tmp, fluxes%fsnow, &
jules_vars%sil_orog_land_gb,psparms%smvccl_soilt, &
psparms%smvcst_soilt,psparms%smvcwt_soilt, &
psparms%sthf_soilt, psparms%sthu_soilt,psparms%z0_surft, &
psparms%z0h_bare_surft, psparms%z0m_soil_gb, &
Expand Down Expand Up @@ -636,9 +636,11 @@ SUBROUTINE surf_couple_explicit( &
urban_param%wrr_gb, &
!Fluxes (IN OUT)
fluxes%anthrop_heat_surft, &
!prognostics (IN)
!snow prognostics (IN)
progs%nsnow_surft, progs%sice_surft, progs%sliq_surft, &
progs%snowdepth_surft, progs%tsnow_surft, progs%ds_surft, &
progs%tsnow_surft, progs%ds_surft, &
!snow prognostics (IN OUT)
progs%snowdepth_surft, progs%snow_surft, &
!c_elevate (OUT)
jules_vars%surf_hgt_surft, jules_vars%lw_down_elevcorr_surft, &
!jules_vars_mod (OUT)
Expand Down
4 changes: 2 additions & 2 deletions src/control/shared/surf_couple_extra_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,9 @@ SUBROUTINE surf_couple_extra( &
fluxes%melt_surft,fluxes%snowinc_surft, &
progs%smcl_soilt(:,:,1),psparms%sthf_soilt(:,:,1), &
fluxes%surf_htf_surft, progs%t_soil_soilt(:,:,1), &
progs%tsurf_elev_surft, progs%tstar_surft, &
progs%tsurf_elev_surft, progs%tstar_surft, psparms%z0_surft, &
psparms%smvcst_soilt(:,:,1), con_snow_wtrac, &
wtrac_jls%ei_surft, progs%rgrain_surft, &
wtrac_jls%ei_surft, fluxes%fsnow, progs%rgrain_surft, &
progs%rgrainl_surft, progs%rho_snow_grnd_surft, &
progs%sice_surft,progs%sliq_surft,progs%snow_grnd_surft, &
progs%snow_surft, progs%snowdepth_surft, progs%tsnow_surft, &
Expand Down
2 changes: 1 addition & 1 deletion src/control/shared/surf_couple_implicit_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ SUBROUTINE surf_couple_implicit( &
alpha1,ashtf_surft, &
jules_vars%dtrdz_charney_grid_1_ij,fracaero_t,fracaero_s, &
resfs,resft, rhokh_surft, &
fluxes%emis_surft,progs%snow_surft,dtstar_surft, &
fluxes%emis_surft,fluxes%fsnow,progs%snow_surft,dtstar_surft, &
! INOUT data :
progs%tstar_surft,fluxes%fqw_surft,fqw_1,ftl_1,fluxes%ftl_surft, &
sf_diag, &
Expand Down
2 changes: 1 addition & 1 deletion src/control/shared/surf_couple_radiation_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ SUBROUTINE surf_couple_radiation( &
progs%rgrain_surft, snow_surft, progs%tstar_surft, psparms%z0_surft, &
ainfo%frac_surft, &
!INTENT(OUT)
fluxes%alb_surft,albobs_sc_ij,fluxes%land_albedo_ij, &
fluxes%alb_surft,albobs_sc_ij,fluxes%fsnow,fluxes%land_albedo_ij, &
!New arguments replacing USE statements
!jules_vars_mod (IN OUT)
jules_vars%albobs_scaling_surft, &
Expand Down
14 changes: 14 additions & 0 deletions src/control/shared/tilepts_jls.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ MODULE tilepts_mod
SUBROUTINE tilepts(land_pts,frac,surft_pts,surft_index,l_lice_point, &
l_lice_surft)

USE jules_snow_mod, ONLY: i_snow_tile

USE jules_surface_mod, ONLY: all_tiles, l_elev_land_ice

USE jules_surface_types_mod, ONLY: ntype, ice, elev_ice, elev_rock
Expand All @@ -41,6 +43,9 @@ SUBROUTINE tilepts(land_pts,frac,surft_pts,surft_index,l_lice_point, &
LOGICAL, INTENT(IN) :: l_lice_point(land_pts)
LOGICAL, INTENT(OUT) :: l_lice_surft(ntype)

LOGICAL :: snow_tile(land_pts)
! Indicates if a separate snow tile is used on a land point

LOGICAL :: use_tile ! Indicates if we will model the tile for the current
! land point

Expand All @@ -62,6 +67,7 @@ SUBROUTINE tilepts(land_pts,frac,surft_pts,surft_index,l_lice_point, &
!$OMP elev_ice, elev_rock, l_lice_point, l_lice_surft, &
!$OMP l_elev_land_ice, surft_pts ) &

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
!$OMP l_elev_land_ice, surft_pts ) &
!$OMP l_elev_land_ice, surft_pts, i_snow_tile ) &

!$OMP PRIVATE( l, n, c, use_tile )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
!$OMP PRIVATE( l, n, c, use_tile )
!$OMP PRIVATE( l, n, c, use_tile, snow_tile )

snow_tile(:) = .FALSE.
DO n = 1,ntype
c = 0
l_lice_surft(n) = ( n == ice .OR. ANY(elev_ice == n) )
Expand All @@ -75,6 +81,14 @@ SUBROUTINE tilepts(land_pts,frac,surft_pts,surft_index,l_lice_point, &
! as this may be needed for on- or off-line icesheet coupling
IF (l_elev_land_ice .AND. l_lice_point(l) .AND. l_lice_surft(n)) &
use_tile = .TRUE.
! Ice tile can be used as a separate snow tile
IF (ANY(i_snow_tile == 1)) THEN
IF (i_snow_tile(n) == 1 .AND. frac(l,n) > 0.0) THEN
snow_tile(l) = .TRUE.
ELSE IF (n == ice .AND. snow_tile(l)) THEN
use_tile = .TRUE.
END IF
END IF
ELSE
! with all_tiles we do
! * All tiles except the ice/elevated tiles on non-land-ice points
Expand Down
23 changes: 14 additions & 9 deletions src/io/model_interface/extract_var.inc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ USE sf_diags_mod, ONLY: &
sf_diag

USE jules_snow_mod, ONLY: &
canSnowTile
canSnowTile, i_snow_tile

USE overbank_inundation_mod, ONLY: &
frac_fplain_lp, frac_fplain_rp
Expand Down Expand Up @@ -1100,15 +1100,20 @@ CASE ( 'snow_depth_gb' )
cube = map_from_land(cube_land)

CASE ( 'snow_frac' )
! Sum frac over tiles with snow.
workspace_land(:) = 0.0
IF ( l_aggregate ) THEN
WHERE ( progs%snow_surft(:,1) + progs%snow_grnd_surft(:,1) > EPSILON(1.0) )
workspace_land(:) = 1.0
END WHERE
ELSE
workspace_land(:) = SUM(ainfo%frac_surft, 2, progs%snow_surft + &
progs%snow_grnd_surft > EPSILON(1.0))
IF (ANY(i_snow_tile == 1)) THEN
! Sum snow cover fractions on tiles
workspace_land(:) = SUM(fluxes%fsnow * ainfo%frac_surft(:,:),2)
ELSE
! Sum frac over tiles with snow.
IF ( l_aggregate ) THEN
WHERE ( progs%snow_surft(:,1) + progs%snow_grnd_surft(:,1) > EPSILON(1.0) )
workspace_land(:) = 1.0
END WHERE
ELSE
workspace_land(:) = SUM(ainfo%frac_surft, 2, progs%snow_surft + &
progs%snow_grnd_surft > EPSILON(1.0))
END IF
END IF
cube_land = cube_from_array(workspace_land)
cube = map_from_land(cube_land)
Expand Down
Loading
Loading