diff --git a/CHANGELOG.md b/CHANGELOG.md index a2d479c4..ab78c7da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,11 +13,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +## [2.1.4] - 2023-05-04 + +### Fixed + +- Fix in GOCART2G parent so that it can run with nitrates turned off. This patch of general utility was contributed by NOAA. ## [2.1.3] - 2023-02-27 ### Added + - Added `*` to CA State specs file to allow for ACG to substitute in the long name - Changes were made so GOCART2G and its children can be run with component level OpenMP threading. The key change is to create the data structure ThreadWorkspace diff --git a/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 index 0a7b9890..79baa616 100644 --- a/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 @@ -648,6 +648,7 @@ subroutine Run2 (GC, import, export, clock, RC) real, allocatable :: tau_mol_layer(:,:,:), tau_aer_layer(:,:,:) real, allocatable :: tau_mol(:,:), tau_aer(:,:) real :: c1, c2, c3 + real :: nifactor real, parameter :: pi = 3.141529265 integer :: ind550, ind532 integer :: i1, i2, j1, j2, km, k,kk @@ -924,6 +925,11 @@ subroutine Run2 (GC, import, export, clock, RC) end do ! Sulfates + nifactor = 132.14/96.06 + if (size(self%NI%instances) > 0) then + if ((self%NI%instances(1)%is_active) .and. (index(self%NI%instances(1)%name, 'data') == 0 )) nifactor = 1.0 + end if + do n = 1, size(self%SU%instances) if ((self%SU%instances(n)%is_active) .and. (index(self%SU%instances(n)%name, 'data') == 0 )) then call MAPL_GetPointer (gex(self%SU%instances(n)%id), suexttau, 'SUEXTTAU', __RC__) @@ -965,20 +971,13 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(pso4tot) .and. associated(pso4)) pso4tot = pso4tot + pso4 call MAPL_GetPointer (gex(self%SU%instances(n)%id), so4smass, 'SO4SMASS', __RC__) - if ((self%NI%instances(1)%is_active) .and. (index(self%NI%instances(1)%name, 'data') == 0 )) then ! Nitrates currently only support one active instance. We check the NI gridded component because SO4MASS can be altered by NI chemistry. - if(associated(pm) .and. associated(so4smass)) pm = pm + so4smass - if(associated(pm25) .and. associated(so4smass)) pm25 = pm25 + so4smass - if(associated(pm_rh35) .and. associated(so4smass)) pm_rh35 = pm_rh35 + 1.33*so4smass - if(associated(pm25_rh35) .and. associated(so4smass)) pm25_rh35 = pm25_rh35 + 1.33*so4smass - if(associated(pm_rh50) .and. associated(so4smass)) pm_rh50 = pm_rh50 + 1.51*so4smass - if(associated(pm25_rh50) .and. associated(so4smass)) pm25_rh50 = pm25_rh50 + 1.51*so4smass - else - if(associated(pm) .and. associated(so4smass)) pm = pm + (132.14/96.06)*so4smass - if(associated(pm25) .and. associated(so4smass)) pm25 = pm25 + (132.14/96.06)*so4smass - if(associated(pm_rh35) .and. associated(so4smass)) pm_rh35 = pm_rh35 + 1.33*(132.14/96.06)*so4smass - if(associated(pm25_rh35) .and. associated(so4smass)) pm25_rh35 = pm25_rh35 + 1.33*(132.14/96.06)*so4smass - if(associated(pm_rh50) .and. associated(so4smass)) pm_rh50 = pm_rh50 + 1.51*(132.14/96.06)*so4smass - if(associated(pm25_rh50) .and. associated(so4smass)) pm25_rh50 = pm25_rh50 + 1.51*(132.14/96.06)*so4smass + if(associated(so4smass)) then + if(associated(pm) ) pm = pm + nifactor*so4smass + if(associated(pm25) ) pm25 = pm25 + nifactor*so4smass + if(associated(pm_rh35) ) pm_rh35 = pm_rh35 + 1.33*nifactor*so4smass + if(associated(pm25_rh35)) pm25_rh35 = pm25_rh35 + 1.33*nifactor*so4smass + if(associated(pm_rh50) ) pm_rh50 = pm_rh50 + 1.51*nifactor*so4smass + if(associated(pm25_rh50)) pm25_rh50 = pm25_rh50 + 1.51*nifactor*so4smass end if if(associated(totangstr) .and. associated(suexttau) .and. associated(suangstr)) then