Skip to content

Commit

Permalink
prc: update some logic in SU2G_GridCompMod
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolarco committed Feb 2, 2024
1 parent d2cb63e commit edf75ed
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

## [#263] - 2024-02-02

### Changed
-Sulfate surface area density calculation in SU_Compute_Diags was incorrectly being passed the effective radius used for settling along with the sigma width of the number distribution. Properly it should be passed the number median radius, also present in the RC file. Added a hook to read that field from the RC file ("particle_radius_number"), store in SU grid comp, and pass to SU_Compute_Diags. This change is zero-diff to the SU internal state. It changes value of export SO4AREA.

-Add some protective logic around reading daily volcanic emission files. If filename does not exist model will write message to standard output and reset volcanic emissions to zero. This is zero difference result unless in a place where the files were not present.

-Changed DMS concentration data holder from ExtData provided (SU_DMSO) to local copy (dmso_conc). This is relevant since if we run source tagged instances where we don't want DMS emissions we would zero out dmso_conc and that is what should be passed to DMSemission subroutine. This is zero diff except in that case.

## [v2.2.1] - 2023-05-30

### Fixed
Expand Down
26 changes: 18 additions & 8 deletions ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ module SU2G_GridCompMod
real :: aviation_layers(4) ! heights of the LTO, CDS and CRS layers
real :: fSO4anth ! Fraction of anthropogenic emissions that are SO4
!logical :: firstRun = .true.
real, allocatable :: rmed(:) ! Median radius of lognormal number distribution
real, allocatable :: sigma(:) ! Sigma of lognormal number distribution
!real, pointer :: h2o2_init(:,:,:)

Expand Down Expand Up @@ -171,12 +172,14 @@ subroutine SetServices ( GC, RC )
! process generic config items
call self%GA_Environment%load_from_config( cfg, universal_cfg, __RC__)

allocate(self%rmed(self%nbins), __STAT__)
allocate(self%sigma(self%nbins), __STAT__)

! process SU-specific items
call ESMF_ConfigGetAttribute(cfg, self%volcano_srcfilen, label='volcano_srcfilen:', __RC__)
call ESMF_ConfigGetAttribute(cfg, self%eAircraftFuel, label='aircraft_fuel_emission_factor:', __RC__)
call ESMF_ConfigGetAttribute(cfg, self%fSO4anth, label='so4_anthropogenic_fraction:', __RC__)
call ESMF_ConfigGetAttribute(cfg, self%rmed, label='particle_radius_number:', __RC__)
call ESMF_ConfigGetAttribute(cfg, self%sigma, label='sigma:', __RC__)
call ESMF_ConfigFindLabel (cfg, 'aviation_vertical_layers:', __RC__)
do i=1,size(self%aviation_layers)
Expand Down Expand Up @@ -824,10 +827,17 @@ subroutine Run1 (GC, import, export, clock, RC)
if(index(self%volcano_srcfilen,'volcanic_') /= 0) then
call StrTemplate(fname, self%volcano_srcfilen, xid='unknown', &
nymd=nymd, nhms=120000 )
call ReadPointEmissions (nymd, fname, workspace%nVolc, workspace%vLat, workspace%vLon, &
workspace%vElev, workspace%vCloud, workspace%vSO2, workspace%vStart, &
workspace%vEnd, label='volcano', __RC__)
workspace%vSO2 = workspace%vSO2 * fMassSO2 / fMassSulfur
inquire( file=fname, exist=fileExists)
if (fileExists) then
call ReadPointEmissions (nymd, fname, workspace%nVolc, workspace%vLat, workspace%vLon, &
workspace%vElev, workspace%vCloud, workspace%vSO2, workspace%vStart, &
workspace%vEnd, label='volcano', __RC__)
workspace%vSO2 = workspace%vSO2 * fMassSO2 / fMassSulfur
else if (.not. fileExists) then
if(mapl_am_i_root()) print*,'GOCART2G ',trim(comp_name),': ',trim(fname),' not found; proceeding.'
workspace%nVolc = 0
end if

! Special possible case
if(self%volcano_srcfilen(1:9) == '/dev/null') workspace%nVolc = 0
end if
Expand Down Expand Up @@ -883,7 +893,7 @@ subroutine Run1 (GC, import, export, clock, RC)

if (associated(dms)) then
call DMSemission (self%km, self%cdt, MAPL_GRAV, t, u10m, v10m, lwi, delp, &
fMassDMS, SU_DMSO, dms, SUEM, nDMS, __RC__)
fMassDMS, dmso_conc, dms, SUEM, nDMS, __RC__)
end if

! Add source of OCS-produced SO2
Expand Down Expand Up @@ -1089,7 +1099,7 @@ subroutine Run2 (GC, import, export, clock, RC)
SUWT, SUPSO4, SUPSO4WT, PSO4, PSO4WET, __RC__ )

! Certain variables are multiplied by 1.0e-9 to convert from nanometers to meters
call SU_Compute_Diags ( self%km, self%klid, self%radius(nSO4), self%sigma(nSO4), self%rhop(nSO4), &
call SU_Compute_Diags ( self%km, self%klid, self%rmed(nSO4), self%sigma(nSO4), self%rhop(nSO4), &
MAPL_GRAV, MAPL_PI, nSO4, self%diag_Mie, &
self%wavelengths_profile*1.0e-9, self%wavelengths_vertint*1.0e-9, &
t, airdens, delp, ple,tropp, rh2, u, v, DMS, SO2, SO4, dummyMSA, &
Expand All @@ -1108,7 +1118,7 @@ subroutine Run2 (GC, import, export, clock, RC)
allocate(RH80(i1:i2,j1:j2,km), __STAT__)

RH20(:,:,:) = 0.20
call SU_Compute_Diags ( km=self%km, klid=self%klid, rmed=self%radius(nSO4), sigma=self%sigma(nSO4),&
call SU_Compute_Diags ( km=self%km, klid=self%klid, rmed=self%rmed(nSO4), sigma=self%sigma(nSO4),&
rhop=self%rhop(nSO4), &
grav=MAPL_GRAV, pi=MAPL_PI, nSO4=nSO4, mie=self%diag_Mie, &
wavelengths_profile=self%wavelengths_profile*1.0e-9, &
Expand All @@ -1118,7 +1128,7 @@ subroutine Run2 (GC, import, export, clock, RC)
scacoef = SUSCACOEFRH20, __RC__)

RH80(:,:,:) = 0.80
call SU_Compute_Diags ( km=self%km, klid=self%klid, rmed=self%radius(nSO4), sigma=self%sigma(nSO4),&
call SU_Compute_Diags ( km=self%km, klid=self%klid, rmed=self%rmed(nSO4), sigma=self%sigma(nSO4),&
rhop=self%rhop(nSO4), &
grav=MAPL_GRAV, pi=MAPL_PI, nSO4=nSO4, mie=self%diag_Mie, &
wavelengths_profile=self%wavelengths_profile*1.0e-9, &
Expand Down

0 comments on commit edf75ed

Please sign in to comment.