Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/pcolarco/#263/su2g_gridcompmod logic #264

Merged
merged 4 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/validate_yaml_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
format: colored
config_file: .yamllint.yml

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: always()
with:
name: yamllint-logfile
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Modified the file paths in carbon, sulfate, and nitrate ExtData.yaml files to used the revised version of the CEDS anthropogenic emissions. Note the previous version has an incorrect seasonal cycle.
- 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.
- 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.

### Fixed

Expand Down
11 changes: 7 additions & 4 deletions ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,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 @@ -187,13 +188,15 @@ 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_degassing, label='volcano_srcfilen_degassing:', __RC__)
call ESMF_ConfigGetAttribute(cfg, self%volcano_srcfilen_explosive, label='volcano_srcfilen_explosive:', __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 @@ -936,7 +939,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 @@ -1144,7 +1147,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 @@ -1163,7 +1166,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 @@ -1173,7 +1176,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
Loading