From c4ef0316095b8c2a5bef3b55014881189933fe3f Mon Sep 17 00:00:00 2001 From: Raffaele Montuoro Date: Fri, 31 Mar 2023 17:41:15 +0000 Subject: [PATCH 1/3] Ensure GOCART2G can run without the NI component. --- .../GOCART2G_GridCompMod.F90 | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) 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 From 533f0c310e5beab4397b85b3d9205fe7a79d3982 Mon Sep 17 00:00:00 2001 From: "Arlindo M. da Silva" <33208803+amdasilva@users.noreply.github.com> Date: Thu, 4 May 2023 15:42:49 -0400 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2d479c4..0bc8b313 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,11 @@ 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 From c218bded7af10677a004e7128b25f58997e0f87d Mon Sep 17 00:00:00 2001 From: Tom Clune Date: Thu, 4 May 2023 15:59:35 -0400 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bc8b313..ab78c7da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### 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