diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 24b412e65..4bf499474 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -11,4 +11,5 @@ | DrTVockerodtMO | Terence Vockerodt | Met Office | 2026-01-08 | | MetBenjaminWent | Benjamin Went | Met Office | 2026-01-15 | | timgraham-Met | Tim Graham | Met Office | 2026-01-15 | -| mo-alistairp | Alistair Pirrie | Met Office | 2026-01-19 | \ No newline at end of file +| mcdalvi | Mohit Dalvi | Met Office | 2026-01-15 | +| mo-alistairp | Alistair Pirrie | Met Office | 2026-01-19 | diff --git a/interfaces/physics_schemes_interface/source/legacy/ukca_interface/ukca_volcanic_so2.F90 b/interfaces/physics_schemes_interface/source/legacy/ukca_interface/ukca_volcanic_so2.F90 index 05f319418..da5d22651 100644 --- a/interfaces/physics_schemes_interface/source/legacy/ukca_interface/ukca_volcanic_so2.F90 +++ b/interfaces/physics_schemes_interface/source/legacy/ukca_interface/ukca_volcanic_so2.F90 @@ -150,6 +150,19 @@ subroutine ukca_volcanic_so2 & if (lhook) call dr_hook(ModuleName//':'//RoutineName,zhook_in,zhook_handle) +! Functionality is not currently implemented in LFRic. +errcode = 1 +cmessage = 'Volcanic SO2 emissions not yet implemented.' // & + 'Logical l_ukca_so2ems_expvolc should be set to .false.' +call ereport(RoutineName, errcode, cmessage) + +! Allocate true_latitude, true_longitude arrays and initialise temporarily. +! These should be subsequently populated from LFRic w3 fields. +if ( .not. allocated(true_latitude)) allocate(true_latitude(row_length,rows)) +if ( .not. allocated(true_longitude)) allocate(true_longitude(row_length,rows)) +true_latitude(:,:) = 0.0 +true_longitude(:,:) = 0.0 + ! On first call, determine locations on the UM grid where volcanos are located. ! The method assumes that the grid is a regular latitude-longitude grid with ! latitude constant on each row and equally-spaced between rows and @@ -334,6 +347,7 @@ subroutine ukca_volcanic_so2 & l2 = l2 - 1 end do if (l2 < l1) l1 = l2 + allocate(weight_volc_vertdist(l2-l1+1)) ! express emission as increase in average increase in mass mixing ratio weight_volc_vertdist = (abs(r_theta_levels(i,j,l1+1:l2+1) - & r_theta_levels(i,j,l1-1:l2-1))/2) * & @@ -343,10 +357,14 @@ subroutine ukca_volcanic_so2 & so2_mmr(i,j,l1:l2) = so2_mmr(i,j,l1:l2) + emission(k) * & (weight_volc_vertdist/sum(weight_volc_vertdist)) / & mass(i,j,l1:l2) + deallocate(weight_volc_vertdist) end if end if end do +if (allocated(true_latitude)) deallocate(true_latitude) +if (allocated(true_longitude)) deallocate(true_longitude) + if (lhook) call dr_hook(ModuleName//':'//RoutineName,zhook_out,zhook_handle) return end subroutine ukca_volcanic_so2