Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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 @@ -10,3 +10,4 @@
| yg460-cam | Yao Ge | University of Cambridge | 2026-04-17 |
| theabro | Nathan Luke Abraham | NCAS & University of Cambridge | 2026-03-19 |
| yaswant | Yaswant Pradhan | Met Office | 2026-07-17 |
| RobWatersMet | Rob Waters | NCAS & University of Cambridge | 2026-07-06 |
9 changes: 5 additions & 4 deletions src/control/core/top_level/ukca_main1-ukca_main1.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2368,8 +2368,8 @@ SUBROUTINE ukca_main1(error_code_ptr, timestep_number, current_time, &
atm_mebr_mol, &
atm_h2_mol, &
H_plus_3d_arr, &
zdryrt, zwetrt, nlev_with_ddep, L_stratosphere, co2_interactive, &
l_firstchem &
zdryrt, zwetrt, nlev_with_ddep, L_stratosphere, &
co2_interactive, l_firstchem &
)

ELSE IF (ukca_config%l_ukca_asad_columns) THEN
Expand Down Expand Up @@ -2406,7 +2406,7 @@ SUBROUTINE ukca_main1(error_code_ptr, timestep_number, current_time, &
atm_mebr_mol, &
atm_h2_mol, &
H_plus_3d_arr, &
zdryrt, zwetrt, nlev_with_ddep &
zdryrt, zwetrt, nlev_with_ddep, co2_interactive &
)

ELSE
Expand Down Expand Up @@ -2442,7 +2442,8 @@ SUBROUTINE ukca_main1(error_code_ptr, timestep_number, current_time, &
atm_mebr_mol, &
atm_h2_mol, &
H_plus_3d_arr, &
zdryrt, zwetrt, nlev_with_ddep, co2_interactive, L_stratosphere, &
zdryrt, zwetrt, nlev_with_ddep, &
co2_interactive, L_stratosphere, &
l_firstchem &
)
END IF
Expand Down
20 changes: 17 additions & 3 deletions src/science/core/chemistry/ukca_chemistry_ctl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ SUBROUTINE ukca_chemistry_ctl( &
USE ukca_config_constants_mod, ONLY: avogadro
USE ukca_config_specification_mod, ONLY: ukca_config
USE ukca_ntp_mod, ONLY: ntp_type, dim_ntp, name2ntpindex

USE yomhook, ONLY: lhook, dr_hook
USE parkind1, ONLY: jprb, jpim
USE ereport_mod, ONLY: ereport
Expand Down Expand Up @@ -118,7 +119,11 @@ SUBROUTINE ukca_chemistry_ctl( &
REAL, INTENT(IN) :: zdryrt(theta_field_size,jpdd) ! dry dep rate
REAL, INTENT(IN) :: zwetrt(tot_n_pnts,jpdw) ! wet dep rate
REAL, INTENT(IN) :: photol_rates(tot_n_pnts,jppj)
REAL, INTENT(IN) :: co2_interactive(tot_n_pnts)

! must be allocatable as passed unallocated from main if l_chem_environ_co2_fld
! is false
REAL, INTENT(IN), ALLOCATABLE :: co2_interactive(:,:,:)
Comment thread
RobWatersMet marked this conversation as resolved.

REAL, INTENT(OUT) :: shno3_3d(tot_n_pnts)
REAL, INTENT(IN OUT) :: q(tot_n_pnts) ! water vapour
REAL, INTENT(IN OUT) :: tracer(tot_n_pnts,ntracers) ! tracer MMR
Expand Down Expand Up @@ -302,15 +307,24 @@ SUBROUTINE ukca_chemistry_ctl( &
! Put tracer mmr into 1-D array for use in ASAD chemical solver
zq(:) = q(kcs:kce)/c_h2o

! CO2 as species
IF (ANY(speci(:) == 'CO2 ')) THEN
! Copy the CO2 concentration into the asad module as VMR
IF (ukca_config%l_chem_environ_co2_fld) THEN
co2_1d(:) = co2_interactive(kcs:kce)/c_co2

! co2_interactive should be allocated if config option on
IF (.NOT. ALLOCATED(co2_interactive)) THEN
errcode = 1
CALL ereport(ModuleName//':'//RoutineName, errcode, &
'ERROR: co2_interactive array not allocated')
END IF

co2_1d(:) = RESHAPE(co2_interactive(:,:,k), [theta_field_size]) / c_co2
ELSE
co2_1d(:) = rmdi
END IF

END IF ! CO2 as species
END IF

! Convert mmr into vmr for tracers. Pass data from the tracer 3D array,
! unwrap it and pass into the 1D zftr array before calling ASAD_CDRIVE.
Expand Down
16 changes: 14 additions & 2 deletions src/science/core/chemistry/ukca_chemistry_ctl_col_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ SUBROUTINE ukca_chemistry_ctl_col( &
atm_mebr_mol, &
atm_h2_mol, &
H_plus_3d_arr, &
zdryrt, zwetrt, nlev_with_ddep &
zdryrt, zwetrt, nlev_with_ddep, co2_interactive &
)

USE asad_mod, ONLY: advt, cdt_diag, ctype, &
Expand Down Expand Up @@ -90,7 +90,6 @@ SUBROUTINE ukca_chemistry_ctl_col( &
USE ukca_config_specification_mod, ONLY: ukca_config

USE ukca_ntp_mod, ONLY: ntp_type, dim_ntp, name2ntpindex
USE ukca_environment_fields_mod, ONLY: co2_interactive

USE yomhook, ONLY: lhook, dr_hook
USE parkind1, ONLY: jprb, jpim
Expand Down Expand Up @@ -141,6 +140,11 @@ SUBROUTINE ukca_chemistry_ctl_col( &
REAL, INTENT(IN) :: zdryrt(row_length,rows,jpdd) ! dry dep rate
REAL, INTENT(IN) :: zwetrt(row_length,rows,model_levels,jpdw) ! wet dep rate
REAL, INTENT(IN) :: photol_rates(row_length,rows,model_levels,jppj)

! must be allocatable as passed unallocated from main if l_chem_environ_co2_fld
! is false
REAL, INTENT(IN), ALLOCATABLE :: co2_interactive(:,:,:)

REAL, INTENT(OUT) :: shno3_3d(row_length,rows,model_levels)
REAL, INTENT(IN OUT) :: q(row_length,rows,model_levels) ! water vapour
REAL, INTENT(IN OUT) :: tracer(row_length,rows,model_levels, &
Expand Down Expand Up @@ -342,6 +346,14 @@ SUBROUTINE ukca_chemistry_ctl_col( &
IF (ANY(speci(:) == 'CO2 ')) THEN
! Copy the CO2 concentration into the asad module as VMR
IF (ukca_config%l_chem_environ_co2_fld) THEN

! co2_interactive should be allocated if config option on
IF (.NOT. ALLOCATED(co2_interactive)) THEN
errcode = 1
CALL ereport(ModuleName//':'//RoutineName, errcode, &
'ERROR: co2_interactive array not allocated')
END IF

co2_1d(:) = co2_interactive(j,i,:)/c_co2
ELSE
co2_1d(:) = rmdi
Expand Down
19 changes: 16 additions & 3 deletions src/science/core/chemistry/ukca_chemistry_ctl_full_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ SUBROUTINE ukca_chemistry_ctl_full( &
REAL, INTENT(IN) :: zdryrt(theta_field_size,jpdd) ! dry dep rate
REAL, INTENT(IN) :: zwetrt(tot_n_pnts,jpdw) ! wet dep rate
REAL, INTENT(IN) :: photol_rates(tot_n_pnts,jppj)
REAL, INTENT(IN) :: co2_interactive(tot_n_pnts)

! must be allocatable as passed unallocated from main if l_chem_environ_co2_fld
! is false
REAL, INTENT(IN), ALLOCATABLE :: co2_interactive(:,:,:)

REAL, INTENT(OUT) :: shno3(tot_n_pnts)
REAL, INTENT(IN OUT) :: q(tot_n_pnts) ! water vapour
REAL, INTENT(IN OUT) :: tracer(tot_n_pnts,ntracers) ! tracer MMR
Expand Down Expand Up @@ -245,14 +249,23 @@ SUBROUTINE ukca_chemistry_ctl_full( &
zprt1d(:,:) = photol_rates(:,:)
END IF

! CO2 as species
IF (ANY(speci(:) == 'CO2 ')) THEN
! Copy the CO2 concentration into the asad module as VMR
IF (ukca_config%l_chem_environ_co2_fld) THEN
co2_1d(:) = co2_interactive(:)/c_co2

! co2_interactive should be allocated if config option on
IF (.NOT. ALLOCATED(co2_interactive)) THEN
errcode = 1
CALL ereport(ModuleName//':'//RoutineName, errcode, &
'ERROR: co2_interactive array not allocated')
END IF

co2_1d(:) = RESHAPE(co2_interactive, [tot_n_pnts]) / c_co2
ELSE
co2_1d(:) = rmdi
END IF
END IF ! CO2 as species
END IF

! Retrieve tropospheric heterogeneous rates from previous time step
IF (ukca_config%l_ukca_trophet) THEN
Expand Down
Loading