Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ contains
integer(i_def), save :: day_of_year, second_of_day
integer(tik) :: id

if ( LPROF ) call start_timing( id, 'jules_exp_alg' )
if ( LPROF ) call start_timing( id, 'jules.explicit' )

call log_event( 'slow_physics: Running explicit JULES layer', LOG_LEVEL_DEBUG )

Expand Down Expand Up @@ -456,7 +456,7 @@ contains
! Switch UM back to columns
call um_sizes_init(1_i_def)

if ( LPROF ) call stop_timing( id, 'jules_exp_alg' )
if ( LPROF ) call stop_timing( id, 'jules.explicit' )

! output JULES diagnostics
if (write_diag .and. use_xios_io) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ contains
integer( kind=i_def ) :: ncells
integer( tik ) :: id

if ( LPROF ) call start_timing( id, 'jules_extra_alg' )
if ( LPROF ) call start_timing( id, 'jules.extra' )

! Unpack precipitation fields
call microphysics_fields%get_field('ls_rain', ls_rain)
Expand Down Expand Up @@ -269,7 +269,7 @@ contains

call um_sizes_init(1_i_def)

if ( LPROF ) call stop_timing( id, 'jules_extra_alg' )
if ( LPROF ) call stop_timing( id, 'jules.extra' )

if (use_xios_io .and. write_diag) then

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ contains
integer(i_def) :: loop, ncells
integer(tik) :: id

if ( LPROF ) call start_timing( id, 'jules_imp_alg' )
if ( LPROF ) call start_timing( id, 'jules.implicit' )

call log_event( 'Running implicit Jules', LOG_LEVEL_DEBUG )

Expand Down Expand Up @@ -305,7 +305,7 @@ contains
surf_radnet, surf_lw_up, surf_lw_down,&
ocn_cpl_point) )

if ( LPROF ) call stop_timing( id, 'jules_imp_alg' )
if ( LPROF ) call stop_timing( id, 'jules.implicit' )

! Output the BL diagnostics
if (use_xios_io .and. write_diag .and. outer == outer_iterations) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ subroutine rad_tile_alg(tile_sw_direct_albedo, tile_sw_diffuse_albedo, &
real( kind=r_def ) :: planet_lw_albedo
integer( tik ) :: id

if ( LPROF ) call start_timing( id, 'rad_tile_alg' )
if ( LPROF ) call start_timing( id, 'jules.radiation' )

vector_space => function_space_collection%get_fs( &
twod_mesh, 0, 0, W3, n_sw_band * n_surf_tile )
Expand Down Expand Up @@ -306,7 +306,7 @@ subroutine rad_tile_alg(tile_sw_direct_albedo, tile_sw_diffuse_albedo, &
call log_event( log_scratch_space, LOG_LEVEL_ERROR )
end if

if ( LPROF ) call stop_timing( id, 'rad_tile_alg' )
if ( LPROF ) call stop_timing( id, 'jules.radiation' )

end subroutine rad_tile_alg
end module rad_tile_alg_mod
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ subroutine initialise_diags_for_jules_exp(z0h_eff, gross_prim_prod, &
type( field_type ), intent(inout) :: soil_respiration
integer( tik ) :: id

if ( LPROF ) call start_timing( id, 'jules_exp_diags' )
if ( LPROF ) call start_timing( id, 'diags.jules_exp' )

z0h_eff_flag = init_diag(z0h_eff, 'surface__z0h_eff')
gross_prim_prod_flag = init_diag(gross_prim_prod, 'surface__gross_prim_prod')
soil_respiration_flag = init_diag(soil_respiration, 'surface__soil_respiration')

if ( LPROF ) call stop_timing( id, 'jules_exp_diags' )
if ( LPROF ) call stop_timing( id, 'diags.jules_exp' )

end subroutine initialise_diags_for_jules_exp

Expand Down Expand Up @@ -82,7 +82,7 @@ subroutine output_diags_for_jules_exp(z0h_eff, tile_fraction, z0m_tile, z0m, &
type( field_type ), intent(in) :: dust_flux
integer( tik ) :: id

if ( LPROF ) call start_timing( id, 'jules_exp_diags' )
if ( LPROF ) call start_timing( id, 'diags.jules_exp' )

! Prognostic fields from surface collection
call tile_fraction%write_field('surface__tile_fraction')
Expand All @@ -102,7 +102,7 @@ subroutine output_diags_for_jules_exp(z0h_eff, tile_fraction, z0m_tile, z0m, &
if (gross_prim_prod_flag) call gross_prim_prod%write_field()
if (soil_respiration_flag) call soil_respiration%write_field()

if ( LPROF ) call stop_timing( id, 'jules_exp_diags' )
if ( LPROF ) call stop_timing( id, 'diags.jules_exp' )

end subroutine output_diags_for_jules_exp
end module jules_exp_diags_mod
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ contains
grid_surface_temperature, grid_latent_heat, grid_sublimation
integer( tik ) :: id

if ( LPROF ) call start_timing( id, 'jules_imp_diags' )
if ( LPROF ) call start_timing( id, 'diags.jules_imp' )

! Output prognostic fields - always output these on 2nd loop
if (loop == 2) then
Expand Down Expand Up @@ -342,7 +342,7 @@ contains

end if

if ( LPROF ) call stop_timing( id, 'jules_imp_diags' )
if ( LPROF ) call stop_timing( id, 'diags.jules_imp' )

end subroutine output_diags_for_jules_imp
end module jules_imp_diags_mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ contains
type( field_type ) :: sea_ice_fraction
integer( tik ) :: id

if ( LPROF ) call start_timing( id, 'jules_seaice_diags' )
if ( LPROF ) call start_timing( id, 'diags.jules_seaice' )

! Prognostic fields
call sea_ice_thickness%write_field('seaice__sea_ice_thickness')
Expand All @@ -65,7 +65,7 @@ contains
first_sea_ice_tile, n_sea_ice_tile))
call sea_ice_fraction%write_field('seaice__sea_ice_fraction')

if ( LPROF ) call stop_timing( id, 'jules_seaice_diags' )
if ( LPROF ) call stop_timing( id, 'diags.jules_seaice' )

end subroutine output_diags_for_jules_seaice
end module jules_seaice_diags_mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ contains
type( field_type ), intent(inout) :: grid_snowmelt
integer( tik ) :: id

if ( LPROF ) call start_timing( id, 'jules_snow_diags' )
if ( LPROF ) call start_timing( id, 'diags.jules_snow' )

! 2D fields
grid_snow_mass_flag = init_diag(grid_snow_mass, 'snow__grid_snow_mass')
if (grid_snow_mass_flag) call invoke( setval_c(grid_snow_mass, 0.0_r_def) )
grid_snowmelt_flag = init_diag(grid_snowmelt, 'snow__grid_snowmelt')

if ( LPROF ) call stop_timing( id, 'jules_snow_diags' )
if ( LPROF ) call stop_timing( id, 'diags.jules_snow' )

end subroutine initialise_diags_for_jules_snow

Expand Down Expand Up @@ -100,7 +100,7 @@ contains
type( field_type ), intent(inout) :: grid_snowmelt
integer( tik ) :: id

if ( LPROF ) call start_timing( id, 'jules_snow_diags' )
if ( LPROF ) call start_timing( id, 'diags.jules_snow' )

! Prognostic fields
call tile_snow_mass%write_field('snow__snow_mass')
Expand All @@ -126,7 +126,7 @@ contains
call grid_snow_mass%write_field()
end if

if ( LPROF ) call stop_timing( id, 'jules_snow_diags' )
if ( LPROF ) call stop_timing( id, 'diags.jules_snow' )

end subroutine output_diags_for_jules_snow
end module jules_snow_diags_mod
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ contains
type( field_type ), intent(inout) :: grid_throughfall
integer( tik ) :: id

if ( LPROF ) call start_timing( id, 'jules_soil_diags' )
if ( LPROF ) call start_timing( id, 'diags.jules_soil' )

! 2D fields
soil_moisture_content_flag = init_diag(soil_moisture_content, 'soil__soil_moisture_content')
Expand All @@ -72,7 +72,7 @@ contains
! Initialise field to that sea and sea-ice tiles have zero values
if (throughfall_flag) call invoke(setval_c(throughfall, 0.0_r_def))

if ( LPROF ) call stop_timing( id, 'jules_soil_diags' )
if ( LPROF ) call stop_timing( id, 'diags.jules_soil' )

end subroutine initialise_diags_for_jules_soil

Expand Down Expand Up @@ -128,7 +128,7 @@ contains
type( field_type ), intent(inout) :: grid_throughfall
integer( tik ) :: id

if ( LPROF ) call start_timing( id, 'jules_soil_diags' )
if ( LPROF ) call start_timing( id, 'diags.jules_soil' )

! Prognostic fields
call canopy_water%write_field('surface__canopy_water')
Expand Down Expand Up @@ -161,7 +161,7 @@ contains
call surface_runoff%write_field('soil__surface_runoff')
call sub_surface_runoff%write_field('soil__sub_surface_runoff')

if ( LPROF ) call stop_timing( id, 'jules_soil_diags' )
if ( LPROF ) call stop_timing( id, 'diags.jules_soil' )

end subroutine output_diags_for_jules_soil
end module jules_soil_diags_mod
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,9 @@ contains
integer( kind=i_def) :: jp1, jp2 ! Indices for photolysis fields

type( field_type ) :: mr_ice
integer( tik ) :: id, id_photo, id_chem
integer( tik ) :: id, id_photo, id_chem, id_diags

if ( LPROF ) call start_timing( id, 'aerosol_ukca_alg' )
if ( LPROF ) call start_timing( id, 'ukca' )

call log_event( 'Running UKCA aerosol', LOG_LEVEL_DEBUG )

Expand Down Expand Up @@ -1030,7 +1030,7 @@ contains
if (mod( model_clock%get_step(), &
chem_timestep/int(model_clock%get_seconds_per_step()) ) == 0) then

if ( LPROF ) call start_timing( id_photo, 'ukca_photolysis_alg' )
if ( LPROF ) call start_timing( id_photo, 'ukca.photolysis_alg' )
! FastJX scheme
if (photol_scheme == photol_scheme_fastjx ) then

Expand Down Expand Up @@ -1150,15 +1150,15 @@ contains

end if ! photol_scheme = fastjx/ prescribed

if ( LPROF ) call stop_timing( id_photo, 'ukca_photolysis_alg' )
if ( LPROF ) call stop_timing( id_photo, 'ukca.photolysis_alg' )

end if ! Chem timestep

end if ! Chem/ photolysis schemes

! Do UKCA time step

if ( LPROF ) call start_timing( id_chem, 'ukca_chemistry_alg' )
if ( LPROF ) call start_timing( id_chem, 'ukca.chemistry_alg' )
call invoke(aerosol_ukca_kernel_type( o3p, &
o1d, &
o3, &
Expand Down Expand Up @@ -1440,7 +1440,7 @@ contains
emiss_so2_nat, &
photol_rates ))

if ( LPROF ) call stop_timing( id_chem, 'ukca_chemistry_alg' )
if ( LPROF ) call stop_timing( id_chem, 'ukca.chemistry_alg' )
call um_sizes_init(1_i_def)

! Save time for reference at next step
Expand All @@ -1457,7 +1457,11 @@ contains
call log_field_minmax( LOG_LEVEL_DEBUG, ' CH4 Aft Chem ', ch4 )
end if

if ( LPROF ) call stop_timing( id, 'ukca' )

if ( write_diag .and. use_xios_io ) then
if ( LPROF ) call start_timing( id_diags, 'diags.ukca' )

! Diagnostic output

! Chemistry diagnostics
Expand Down Expand Up @@ -1652,11 +1656,11 @@ contains
call pvol_du_acc_ins%write_field('aerosol__pvol_du_acc_ins')
call pvol_du_cor_ins%write_field('aerosol__pvol_du_cor_ins')

if ( LPROF ) call stop_timing( id_diags, 'diags.ukca' )
end if ! write diag

nullify( mesh )

if ( LPROF ) call stop_timing( id, 'aerosol_ukca_alg' )

end subroutine aerosol_ukca_alg

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ contains
integer(i_def) :: ncells
integer(tik) :: id

if ( LPROF ) call start_timing( id, 'bl_exp_alg' )
if ( LPROF ) call start_timing( id, 'bl.explicit' )

call log_event( 'slow_physics: Running explicit Boundary layer', LOG_LEVEL_DEBUG )

Expand Down Expand Up @@ -415,13 +415,13 @@ contains
call um_sizes_init(1_i_def)

if (formdrag == formdrag_dist_drag) then
if ( LPROF ) call stop_timing( id, 'bl_exp_alg' )
if ( LPROF ) call stop_timing( id, 'bl.explicit' )
call theta%copy_field_properties(fd_tauz)
call invoke(setval_c(fd_tauz, 0.0_r_def))
! Calculate form drag stress in w2
call set_wind(fd_tau_w2,fd_taux,fd_tauy,fd_tauz)
call invoke(inc_X_divideby_Y(fd_tau_w2, dA))
if ( LPROF ) call start_timing( id, 'bl_exp_alg' )
if ( LPROF ) call start_timing( id, 'bl.explicit' )
end if

! Calculate explicit momentum diffusion on cell faces
Expand Down Expand Up @@ -453,7 +453,7 @@ contains
sea_v_current_ptr) )
end if

if ( LPROF ) call stop_timing( id, 'bl_exp_alg' )
if ( LPROF ) call stop_timing( id, 'bl.explicit' )

! output BL diagnostics
if (write_diag .and. use_xios_io) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ contains
integer(tik) :: id


if ( LPROF ) call start_timing( id, 'bl_imp_alg' )
if ( LPROF ) call start_timing( id, 'bl.implicit' )

call log_event( 'Running implicit Boundary layer', LOG_LEVEL_DEBUG )

Expand Down Expand Up @@ -331,15 +331,15 @@ contains
call u_physics%copy_field_properties(du_conv_w2)
if ( cv_scheme == cv_scheme_gregory_rowntree .or. &
cv_scheme == cv_scheme_comorph ) then
if ( LPROF ) call stop_timing( id, 'bl_imp_alg' )
if ( LPROF ) call stop_timing( id, 'bl.implicit' )
call theta%copy_field_properties(dw_conv)
call invoke(setval_c(dw_conv, 0.0_r_def) )
call set_wind(du_conv_w2, du_conv, dv_conv, dw_conv)
call dw_conv%field_final()
! Set wind provides output in dynamics quantites, need to remove
! dA scaling for physics
call invoke(inc_X_divideby_Y(du_conv_w2, dA) )
if ( LPROF ) call start_timing( id, 'bl_imp_alg' )
if ( LPROF ) call start_timing( id, 'bl.implicit' )
else
call invoke(setval_c(du_conv_w2, 0.0_r_def) )
end if
Expand Down Expand Up @@ -477,7 +477,7 @@ contains
setval_X(moist_flux_bl,fqw) )
end if

if ( LPROF ) call stop_timing( id, 'bl_imp_alg' )
if ( LPROF ) call stop_timing( id, 'bl.implicit' )

! Calculate and output fields on last iteration only
if (use_xios_io .and. outer == outer_iterations) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ contains
integer(i_def), parameter :: stencil_depth_edge = 1
integer(i_def), parameter :: stencil_depth_buff = 1
real(r_def) :: dt, auto_corr_coeff, tfac
integer(tik) :: id
integer(tik) :: id, id_diag

if ( LPROF ) call start_timing( id, 'blpert_main_alg' )
if ( LPROF ) call start_timing( id, 'stoch_phys.blpert' )

nullify(vector_space, coarse_vector_space, mesh, coarse_mesh, &
twod_mesh, coarse_twod_mesh, local_mesh, mesh_map, &
Expand Down Expand Up @@ -308,15 +308,18 @@ contains
theta_star_surf, qv_star_surf, blpert_rand_fld, &
pert_lev_bot, pert_lev_top, tfac) )

if ( LPROF ) call stop_timing( id, 'stoch_phys.blpert' )

!----------------------------------------------------------------!
! Write fields to diagnostics if requested
!----------------------------------------------------------------!
if (write_diag .and. use_xios_io) then
if ( LPROF ) call start_timing( id_diag, 'diags.blpert' )
call dtheta_base%write_field('stochastic__dtheta_base_blpert')
call dmv_base%write_field('stochastic__dmv_base_blpert')
end if
if ( LPROF ) call stop_timing( id_diag, 'diags.blpert' )

if ( LPROF ) call stop_timing( id, 'blpert_main_alg' )
end if

end subroutine blpert_main_alg
end module blpert_main_alg_mod
Loading