Skip to content

Commit

Permalink
changes to allow for radii from the optics files to be used for settling
Browse files Browse the repository at this point in the history
  • Loading branch information
acollow committed Feb 12, 2024
1 parent 6ea78fd commit 8a70fdc
Show file tree
Hide file tree
Showing 16 changed files with 89 additions and 120 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Changed

-Changed Chem_SettlingSimple in the process library to call Mie Query for radius and rhop inputs to the settling velocity calculation. The calls to Chem_SettlingSimple were then changed accordingly in each of the species' grid comps. Since the RH flag is no longer needed, it was removed from GA_EnvironmentMod.F90 and each of the instance RC files.
## [v2.2.1] - 2023-05-30

### Fixed
Expand Down
11 changes: 7 additions & 4 deletions ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module CA2G_GridCompMod
! !DESCRIPTION: This module implements GOCART2G's Carbonaceous Aerosol (CA) Gridded Component.

! !REVISION HISTORY:
! 4January2024 Collow - Updated call for ChemSettling
! 15June2020 Sherman, da Silva, Darmenov, Clune - First attempt at refactoring.

!EOP
Expand Down Expand Up @@ -931,6 +932,7 @@ subroutine Run2 (GC, import, export, clock, RC)
character(len=2) :: GCsuffix
character(len=ESMF_MAXSTR) :: short_name
real, pointer, dimension(:,:,:) :: intPtr_phobic, intPtr_philic
real, pointer, dimension(:,:) :: flux_ptr

real, parameter :: cpd = 1004.16
integer :: i1, j1, i2, j2, km
Expand Down Expand Up @@ -1005,10 +1007,11 @@ subroutine Run2 (GC, import, export, clock, RC)
do n = 1, self%nbins
call MAPL_VarSpecGet(InternalSpec(n), SHORT_NAME=short_name, __RC__)
call MAPL_GetPointer(internal, NAME=short_name, ptr=int_ptr, __RC__)

call Chem_Settling (self%km, self%klid, n, self%rhFlag, self%cdt, MAPL_GRAV, &
self%radius(n)*1.e-6, self%rhop(n), int_ptr, t, airdens, &
rh2, zle, delp, SD, __RC__)
nullify(flux_ptr)
flux_ptr => SD(:,:,n)
call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, n, self%cdt, MAPL_GRAV, &
int_ptr, t, airdens, &
rh2, zle, delp, flux_ptr, __RC__)
end do

! CA Deposition
Expand Down
4 changes: 1 addition & 3 deletions ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.bc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_BC.v1_3.RRTMG.nc
aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_BC.v1_3.nc
aerosol_monochromatic_optics_file: /discover/nobackup/pcolarco/fvInput/AeroCom/x/optics_BC.v1_6.nc

# Aircraft emission factor: convert input unit to kg C
aircraft_fuel_emission_factor: 1.0000
Expand All @@ -29,8 +29,6 @@ fnum: 1.50e19 1.50e19
# Number median radius [um]
particle_radius_microns: 0.35 0.35

rhFlag: 0

# Sigma of lognormal number distribution
sigma: 2.0 2.0

Expand Down
4 changes: 1 addition & 3 deletions ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.br.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_BRC.v1_5.RRTMG.nc
aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_BRC.v1_5.nc
aerosol_monochromatic_optics_file: /discover/nobackup/pcolarco/fvInput/AeroCom/x/optics_BRC.v1_6.nc

# Aircraft emission factor: convert input unit to kg C
aircraft_fuel_emission_factor: 1.0000
Expand All @@ -17,8 +17,6 @@ pom_ca_ratio: 1.8
# particle radius
particle_radius_microns: 0.35 0.35

rhFlag: 0

# Initially hydrophobic portion
hydrophobic_fraction: 0.5

Expand Down
4 changes: 1 addition & 3 deletions ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.oc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_OC.v1_3.RRTMG.nc
aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_OC.v1_3.nc
aerosol_monochromatic_optics_file: /discover/nobackup/pcolarco/fvInput/AeroCom/x/optics_OC.v1_6.nc

# Aircraft emission factor: convert input unit to kg C
aircraft_fuel_emission_factor: 1.0000
Expand All @@ -21,8 +21,6 @@ pom_ca_ratio: 1.8
# particle radius
particle_radius_microns: 0.35 0.35

rhFlag: 0

# Initially hydrophobic portion
hydrophobic_fraction: 0.5

Expand Down
12 changes: 7 additions & 5 deletions ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module DU2G_GridCompMod
! !DESCRIPTION: This module implements GOCART's Dust (DU) Gridded Component.

! !REVISION HISTORY:
! 4January2024 Collow - Updated call for ChemSettling
! 16Oct2019 Sherman, da Silva, Darmenov, Clune - First attempt at refactoring

!EOP
Expand Down Expand Up @@ -906,6 +907,7 @@ subroutine Run2 (GC, import, export, clock, RC)
integer :: i1, j1, i2, j2, km
real, parameter :: cpd = 1004.16
real, target, allocatable, dimension(:,:,:) :: RH20,RH80
real, pointer, dimension(:,:) :: flux_ptr
#include "DU2G_DeclarePointer___.h"

__Iam__('Run2')
Expand Down Expand Up @@ -942,11 +944,11 @@ subroutine Run2 (GC, import, export, clock, RC)
! Dust Settling
! -------------
do n = 1, self%nbins
call Chem_Settling (self%km, self%klid, n, self%rhFlag, self%cdt, MAPL_GRAV, &
self%radius(n)*1.e-6, self%rhop(n), DU(:,:,:,n), t, airdens, &
rh2, zle, delp, DUSD, correctionMaring=self%maringFlag, __RC__)


nullify(flux_ptr)
if (associated(DUSD)) flux_ptr => DUSD(:,:,n)
call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, n, self%cdt, MAPL_GRAV, &
DU(:,:,:,n), t, airdens, &
rh2, zle, delp, flux_ptr, correctionMaring=self%maringFlag, __RC__)
end do

! Dust Deposition
Expand Down
4 changes: 1 addition & 3 deletions ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_DU.v15_3.RRTMG.nc
aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_DU.v15_3.nc
aerosol_monochromatic_optics_file: /discover/nobackup/pcolarco/fvInput/AeroCom/x/optics_DU.v15_6.nc

particle_radius_microns: 0.73 1.4 2.4 4.5 8.0

Expand Down Expand Up @@ -50,8 +50,6 @@ molecular_weight: 0.1 0.1 0.1 0.1 0.1
# Number of particles per kg mass
fnum: 2.45e14 3.28e13 6.52e12 9.89e11 1.76e11

rhFlag: 0

# Maring settling velocity correction
maringFlag: .true.

Expand Down
2 changes: 0 additions & 2 deletions ESMF/GOCART2G_GridComp/GA_Environment/GA_EnvironmentMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module GA_EnvironmentMod
! logical :: scav_byColdCloud ! new flag example
real, allocatable :: molwght(:) ! molecular weight !NOT UNIVERSAL ONLY FOR GASES,
real, allocatable :: fnum(:) ! number of particles per kg mass
integer :: rhFlag
integer :: nbins
integer :: km ! vertical grid dimension
real :: CDT ! chemistry timestep (secs)
Expand Down Expand Up @@ -66,7 +65,6 @@ subroutine load_from_config(self, cfg, universal_cfg, rc)
call ESMF_ConfigGetAttribute (cfg, self%fscav, label='fscav:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%molwght, label='molecular_weight:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%fnum, label='fnum:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%rhFlag, label='rhFlag:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%plid, label='pressure_lid_in_hPa:', __RC__)
call ESMF_ConfigGetAttribute (universal_cfg, self%wavelengths_profile, label='wavelengths_for_profile_aop_in_nm:', __RC__)
call ESMF_ConfigGetAttribute (universal_cfg, self%wavelengths_vertint, &
Expand Down
60 changes: 18 additions & 42 deletions ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module NI2G_GridCompMod
! !DESCRIPTION: This module implements GOCART's Nitrate (NI) Gridded Component.

! !REVISION HISTORY:
! 4January2024 Collow - Updated call for ChemSettling
! 01July2020 Sherman, da Silva, Darmenov, Clune - First attempt at refactoring.

!EOP
Expand Down Expand Up @@ -786,54 +787,29 @@ subroutine Run2 (GC, import, export, clock, RC)

! NI Settling
! -----------
! Because different bins having different swelling coefficients I need to
! handle the call to settling differently.

! Ammonium - settles like ammonium sulfate (rhflag = 3)
rhflag = 3
! call Chem_SettlingSimpleOrig (self%km, self%klid, rhflag, MAPL_GRAV, self%cdt, &
! 1.e-6*self%radius(nNH4a), self%rhop(nNH4a), &
! NH4a, t, airdens, rh2, delp, zle, NH4SD, __RC__)
call Chem_SettlingSimple (self%km, self%klid, rhFlag, self%cdt, MAPL_GRAV, &
self%radius(nNH4a)*1.e-6, self%rhop(nNH4a), NH4a, t, &
airdens, rh2, zle, delp, NH4SD, __RC__)
! Save local copy of HNO3 for first pass through run method regardless

! Nitrate bin 1 - settles like ammonium sulfate (rhflag = 3)
rhflag = 3
! Ammonium - settles like bin 1 of nitrate
call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, 1, self%cdt, MAPL_GRAV, &
NH4a, t, airdens, rh2, zle, delp, NH4SD, __RC__)
! Nitrate Bin 1
nullify(flux_ptr)
if (associated(NISD)) flux_ptr => NISD(:,:,1)
! call Chem_SettlingSimpleOrig (self%km, self%klid, rhFlag, MAPL_GRAV, self%cdt, &
! 1.e-6*self%radius(nNO3an1), self%rhop(nNO3an1), &
! NO3an1, t, airdens, rh2, delp, zle, flux_ptr, __RC__)
call Chem_SettlingSimple (self%km, self%klid, rhFlag, self%cdt, MAPL_GRAV, &
self%radius(nNO3an1)*1.e-6, self%rhop(nNO3an1), NO3an1, &
t, airdens, rh2, zle, delp, flux_ptr, __RC__)
! Save local copy of HNO3 for first pass through run method regardless

! Nitrate bin 2 - settles like sea salt (rhflag = 2)
rhflag = 2
call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, 1, self%cdt, MAPL_GRAV, &
NO3an1, t, airdens, &
rh2, zle, delp, flux_ptr, __RC__)
! Nitrate Bin 2
nullify(flux_ptr)
if (associated(NISD)) flux_ptr => NISD(:,:,2)
! call Chem_SettlingSimpleOrig (self%km, self%klid, rhFlag, MAPL_GRAV, self%cdt, &
! 1.e-6*self%radius(nNO3an2), self%rhop(nNO3an2), &
! NO3an2, t, airdens, rh2, delp, zle, flux_ptr, __RC__)
call Chem_SettlingSimple (self%km, self%klid, rhFlag, self%cdt, MAPL_GRAV, &
self%radius(nNO3an2)*1.e-6, self%rhop(nNO3an2), NO3an2, &
t, airdens, rh2, zle, delp, flux_ptr, __RC__)
! Save local copy of HNO3 for first pass through run method regardless

! Nitrate bin 1 - settles like dust (rhflag = 0)
rhflag = 0
call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, 2, self%cdt, MAPL_GRAV, &
NO3an2, t, airdens, &
rh2, zle, delp, flux_ptr, __RC__)
! Nitrate Bin 3
nullify(flux_ptr)
if (associated(NISD)) flux_ptr => NISD(:,:,3)
! call Chem_SettlingSimpleOrig (self%km, self%klid, rhFlag, MAPL_GRAV, self%cdt, &
! 1.e-6*self%radius(nNO3an3), self%rhop(nNO3an3), &
! NO3an3, t, airdens, rh2, delp, zle, flux_ptr, __RC__)
call Chem_SettlingSimple (self%km, self%klid, rhFlag, self%cdt, MAPL_GRAV, &
self%radius(nNO3an3)*1.e-6, self%rhop(nNO3an3), NO3an3, &
t, airdens, rh2, zle, delp, flux_ptr, __RC__)
! Save local copy of HNO3 for first pass through run method regardless
call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, 3, self%cdt, MAPL_GRAV, &
NO3an3, t, airdens, &
rh2, zle, delp, flux_ptr, __RC__)



! NI Deposition
! -----------
Expand Down
4 changes: 1 addition & 3 deletions ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_instance_NI.rc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
nbins: 5

aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_NI.v2_5.RRTMG.nc
aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_NI.v2_5.nc
aerosol_monochromatic_optics_file: /discover/nobackup/pcolarco/fvInput/AeroCom/x/optics_NI.v2_5.nc

# Scavenging efficiency per bin [km-1]
fscav: 0.0 0.4 0.4 0.4 0.4
Expand All @@ -29,5 +29,3 @@ particle_radius_number: 0.0118 0.0118 0.0118 0.0118 0.0118
sigma: 2.0 2.0 2.0 2.0 2.0

pressure_lid_in_hPa: 0.01

rhFlag: 0
30 changes: 17 additions & 13 deletions ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -696,11 +696,12 @@ subroutine Run1 (GC, import, export, clock, RC)

! For the Hoppel correction need to compute the wet radius and settling velocity
! in the surface
if (self%hoppelFlag) then
call hoppelCorrection (self%radius(n)*1.e-6, self%rhop(n), rh2(:,:,self%km), &
dz, ustar, self%rhFlag, airdens(:,:,self%km), t(:,:,self%km), &
MAPL_GRAV, MAPL_KARMAN, fhoppel, __RC__)
end if
! Collow: commented out 9 Jan 2024 as this is not consistent with the updated settling based on the optics files. The flag to call this is set to false in the instance RC file. This should be revistited in the future.
! if (self%hoppelFlag) then
! call hoppelCorrection (self%radius(n)*1.e-6, self%rhop(n), rh2(:,:,self%km), &
! dz, ustar, self%rhFlag, airdens(:,:,self%km), t(:,:,self%km), &
! MAPL_GRAV, MAPL_KARMAN, fhoppel, __RC__)
! end if

memissions = self%emission_scale * fgridefficiency * fsstemis * fhoppel * gweibull * memissions
dqa = memissions * self%cdt * MAPL_GRAV / delp(:,:,self%km)
Expand Down Expand Up @@ -733,7 +734,7 @@ subroutine Run2 (GC, import, export, clock, RC)
type (ESMF_Clock), intent(inout) :: clock ! The clock
integer, optional, intent( out) :: RC ! Error code:

! !DESCRIPTION: Run2 method for the Dust Grid Component.
! !DESCRIPTION: Run2 method for the Sea Salt Grid Component.

!EOP
!============================================================================
Expand All @@ -751,6 +752,7 @@ subroutine Run2 (GC, import, export, clock, RC)

integer :: i1, j1, i2, j2, km
real, target, allocatable, dimension(:,:,:) :: RH20,RH80
real, pointer, dimension(:,:) :: flux_ptr
#include "SS2G_DeclarePointer___.h"

__Iam__('Run2')
Expand Down Expand Up @@ -785,9 +787,11 @@ subroutine Run2 (GC, import, export, clock, RC)
! Sea Salt Settling
! -----------------
do n = 1, self%nbins
call Chem_Settling (self%km, self%klid, n, self%rhFlag, self%cdt, MAPL_GRAV, &
self%radius(n)*1.e-6, self%rhop(n), SS(:,:,:,n), t, airdens, &
rh2, zle, delp, SSSD, __RC__)
nullify(flux_ptr)
if (associated(SSSD)) flux_ptr => SSSD(:,:,n)
call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, n, self%cdt, MAPL_GRAV, &
SS(:,:,:,n), t, airdens, &
rh2, zle, delp, flux_ptr, __RC__)
end do

! Deposition
Expand Down Expand Up @@ -840,17 +844,17 @@ subroutine Run2 (GC, import, export, clock, RC)

RH20(:,:,:) = 0.20
call Aero_Compute_Diags (mie=self%diag_Mie, km=self%km, klid=self%klid, nbegin=1, &
nbins=self%nbins, rlow=self%rlow, &
rup=self%rup, wavelengths_profile=self%wavelengths_profile*1.0e-9, &
nbins=self%nbins, rlow=self%rlow, rup=self%rup, &
wavelengths_profile=self%wavelengths_profile*1.0e-9, &
wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=SS, &
grav=MAPL_GRAV, tmpu=t, rhoa=airdens, &
rh=rh20,u=u, v=v, delp=delp, ple=ple,tropp=tropp, &
extcoef = SSEXTCOEFRH20, scacoef = SSSCACOEFRH20, NO3nFlag=.False., __RC__)

RH80(:,:,:) = 0.80
call Aero_Compute_Diags (mie=self%diag_Mie, km=self%km, klid=self%klid, nbegin=1, &
nbins=self%nbins, rlow=self%rlow, &
rup=self%rup, wavelengths_profile=self%wavelengths_profile*1.0e-9, &
nbins=self%nbins, rlow=self%rlow, rup=self%rup, &
wavelengths_profile=self%wavelengths_profile*1.0e-9, &
wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=SS, &
grav=MAPL_GRAV, tmpu=t, rhoa=airdens, &
rh=rh80,u=u, v=v, delp=delp, ple=ple,tropp=tropp, &
Expand Down
6 changes: 1 addition & 5 deletions ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_instance_SS.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_SS.v3_3.RRTMG.nc
aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_SS.v3_3.nc
aerosol_monochromatic_optics_file: /discover/nobackup/pcolarco/fvInput/AeroCom/x/optics_SS.v3_6.nc

particle_radius_microns: 0.079 0.316 1.119 2.818 7.772

Expand All @@ -23,10 +23,6 @@ sstEmisFlag: 2 # Apply a correction to e
hoppelFlag: .false. # Apply Hoppel correction (set non-zero, see Fan and Toon 2011)
weibullFlag: .false. # Apply Weibull distribution (set non-zero, see Fan and Toon 2011)

# Method of apply relative humidity to particle radius
rhFlag: 2 # RH swelling of Seasalt (1 for Fitzgerald 1975,
# 2 for Gerber 1985 method)

# Molecular weight of species [kg mole-1]
molecular_weight: 0.058 0.058 0.058 0.058 0.058

Expand Down
14 changes: 8 additions & 6 deletions ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ module SU2G_GridCompMod
! !DESCRIPTION: This module implements GOCART's Sulfer (SU) Gridded Component.

! !REVISION HISTORY:
! 04January2024 Collow - Update to ChemSettling Call
! 08July2020 Sherman, da Silva, Darmenov, Clune - First attempt at refactoring.

!EOP
Expand Down Expand Up @@ -948,7 +949,7 @@ subroutine Run2 (GC, import, export, clock, RC)
type (ESMF_Clock), intent(inout) :: clock ! The clock
integer, optional, intent( out) :: RC ! Error code:

! !DESCRIPTION: Run2 method for the Dust Grid Component.
! !DESCRIPTION: Run2 method for the Sulfate Grid Component.

!EOP
!============================================================================
Expand Down Expand Up @@ -979,7 +980,7 @@ subroutine Run2 (GC, import, export, clock, RC)
integer :: thread
integer :: i1, j1, i2, j2, km
real, target, allocatable, dimension(:,:,:) :: RH20,RH80

real, pointer, dimension(:,:) :: flux_ptr
#include "SU2G_DeclarePointer___.h"

__Iam__('Run2')
Expand Down Expand Up @@ -1060,10 +1061,11 @@ subroutine Run2 (GC, import, export, clock, RC)

call MAPL_VarSpecGet(InternalSpec(n), SHORT_NAME=short_name, __RC__)
call MAPL_GetPointer(internal, NAME=short_name, ptr=int_ptr, __RC__)

call Chem_Settling (self%km, self%klid, n, self%rhFlag, self%cdt, MAPL_GRAV, &
self%radius(n)*1.e-6, self%rhop(n), int_ptr, t, airdens, &
rh2, zle, delp, SUSD, __RC__)
nullify(flux_ptr)
if (associated(SUSD)) flux_ptr => SUSD(:,:,n)
call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, 1, self%cdt, MAPL_GRAV, &
int_ptr, t, airdens, &
rh2, zle, delp, flux_ptr, __RC__)
end do

allocate(drydepositionf, mold=lwi, __STAT__)
Expand Down
Loading

0 comments on commit 8a70fdc

Please sign in to comment.