Skip to content

Commit

Permalink
Fix other indices in the reverse direction.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmielin committed Mar 30, 2023
1 parent 1a3fbcf commit 935edbb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/chemistry/geoschem/chemistry.F90
Expand Up @@ -3927,8 +3927,8 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dT, pbuf, fh2o )
! First deal with lowest two volatility bins
speciesName_1 = 'TSOA0'
speciesName_2 = 'ASOAN'
speciesName_2 = 'SOAIE'
speciesName_2 = 'SOAGX'
speciesName_3 = 'SOAIE'
speciesName_4 = 'SOAGX'
K1 = get_spc_ndx(TRIM(speciesName_1), compare_uppercase=.true.)
K2 = get_spc_ndx(TRIM(speciesName_2), compare_uppercase=.true.)
K3 = get_spc_ndx(TRIM(speciesName_3), compare_uppercase=.true.)
Expand Down Expand Up @@ -3986,11 +3986,12 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dT, pbuf, fh2o )
ENDDO

! Now deal with gaseous SOA species
! Deal with lowest two volatility bins
! Deal with lowest two volatility bins - TSOG0 corresponds to SOAG0 and SOAG1
speciesName_1 = 'TSOG0'
K1 = get_spc_ndx(TRIM(speciesName_1), compare_uppercase=.true.)
N = lptr2_soa_g_amode(1)
P = mapCnst(N)
! current mode other modes (this mapping was verified to be correct.)
vmr1(:nY,:nZ,P) = vmr0(:nY,:nZ,P) / (vmr0(:nY,:nZ,P) + vmr0(:nY,:nZ,mapCnst(lptr2_soa_g_amode(2)))) &
* vmr1(:nY,:nZ,K1)
N = lptr2_soa_g_amode(2)
Expand Down

0 comments on commit 935edbb

Please sign in to comment.