From 8a70fdc6fbe60575a872a743b1161b1c46bbb26f Mon Sep 17 00:00:00 2001 From: acollow Date: Mon, 12 Feb 2024 09:30:03 -0500 Subject: [PATCH] changes to allow for radii from the optics files to be used for settling --- CHANGELOG.md | 2 +- .../CA2G_GridComp/CA2G_GridCompMod.F90 | 11 ++-- .../CA2G_GridComp/CA2G_instance_CA.bc.rc | 4 +- .../CA2G_GridComp/CA2G_instance_CA.br.rc | 4 +- .../CA2G_GridComp/CA2G_instance_CA.oc.rc | 4 +- .../DU2G_GridComp/DU2G_GridCompMod.F90 | 12 ++-- .../DU2G_GridComp/DU2G_instance_DU.rc | 4 +- .../GA_Environment/GA_EnvironmentMod.F90 | 2 - .../NI2G_GridComp/NI2G_GridCompMod.F90 | 60 ++++++------------- .../NI2G_GridComp/NI2G_instance_NI.rc | 4 +- .../SS2G_GridComp/SS2G_GridCompMod.F90 | 30 ++++++---- .../SS2G_GridComp/SS2G_instance_SS.rc | 6 +- .../SU2G_GridComp/SU2G_GridCompMod.F90 | 14 +++-- .../SU2G_GridComp/SU2G_instance_SU.rc | 5 +- Process_Library/GOCART2G_Process.F90 | 43 +++++++------ Process_Library/MieQuery.H | 4 ++ 16 files changed, 89 insertions(+), 120 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25023cc6..7030528c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 index 9e66db2b..3b6836c1 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 @@ -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 @@ -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 @@ -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 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.bc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.bc.rc index e39a970e..a8882b3a 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.bc.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.bc.rc @@ -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 @@ -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 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.br.rc index 7f333ffa..bb796775 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.br.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.br.rc @@ -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 @@ -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 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.oc.rc index 741d6bfd..a2cca44a 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.oc.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.oc.rc @@ -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 @@ -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 diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 index 71e78c8e..246ea2a1 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 @@ -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 @@ -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') @@ -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 diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc index 30df3064..3ab534f7 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc @@ -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 @@ -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. diff --git a/ESMF/GOCART2G_GridComp/GA_Environment/GA_EnvironmentMod.F90 b/ESMF/GOCART2G_GridComp/GA_Environment/GA_EnvironmentMod.F90 index bfac0c34..ea6eaa86 100644 --- a/ESMF/GOCART2G_GridComp/GA_Environment/GA_EnvironmentMod.F90 +++ b/ESMF/GOCART2G_GridComp/GA_Environment/GA_EnvironmentMod.F90 @@ -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) @@ -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, & diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 index 448ae57a..ca497816 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 @@ -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 @@ -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 ! ----------- diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_instance_NI.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_instance_NI.rc index 23647978..92c97e44 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_instance_NI.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_instance_NI.rc @@ -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 @@ -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 diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 index e6f7e2a8..c9b6f007 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 @@ -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) @@ -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 !============================================================================ @@ -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') @@ -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 @@ -840,8 +844,8 @@ 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, & @@ -849,8 +853,8 @@ subroutine Run2 (GC, import, export, clock, 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, & diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_instance_SS.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_instance_SS.rc index 62be6a53..540d1b7d 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_instance_SS.rc +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_instance_SS.rc @@ -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 @@ -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 diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 index 6c4abc37..e37a7812 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 @@ -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 @@ -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 !============================================================================ @@ -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') @@ -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__) diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_instance_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_instance_SU.rc index a842807a..6fb04f80 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_instance_SU.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_instance_SU.rc @@ -3,7 +3,7 @@ # aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_SU.v1_3.RRTMG.nc -aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_SU.v1_3.nc +aerosol_monochromatic_optics_file: /discover/nobackup/pcolarco/fvInput/AeroCom/x/optics_SU.v1_6.nc nbins: 4 @@ -25,9 +25,6 @@ fscav: 0.0 0.0 0.4 0.4 # Dry particle radius [um], used for settling particle_radius_microns: 0.0 0.0 0.35 0.0 -# Type of settling to use (see Chem_SettlingMod) -rhFlag: 4 - # Dry particle density [kg m-3] particle_density: -1 -1 1700 -1 diff --git a/Process_Library/GOCART2G_Process.F90 b/Process_Library/GOCART2G_Process.F90 index 6892082c..97fd09cc 100644 --- a/Process_Library/GOCART2G_Process.F90 +++ b/Process_Library/GOCART2G_Process.F90 @@ -1092,9 +1092,9 @@ end subroutine DistributePointEmission !BOP ! !IROUTINE: Chem_SettlingSimple - subroutine Chem_SettlingSimple ( km, klid, flag, cdt, grav, & - radiusInp, rhopInp, int_qa, tmpu, & - rhoa, rh, hghte, delp, fluxout, & + subroutine Chem_SettlingSimple ( km, klid, mie, bin, cdt, grav, & + int_qa, tmpu, rhoa, rh, hghte, & + delp, fluxout, & vsettleOut, correctionMaring, rc) ! !USES: @@ -1104,11 +1104,10 @@ subroutine Chem_SettlingSimple ( km, klid, flag, cdt, grav, & ! !INPUT PARAMETERS: integer, intent(in) :: km ! total model levels integer, intent(in) :: klid ! index for pressure lid - integer, intent(in) :: flag ! flag to control particle swelling (see note) + type(GOCART2G_Mie), intent(in) :: mie ! mie table + integer, intent(in) :: bin ! aerosol bin index real, intent(in) :: cdt real, intent(in) :: grav ! gravity [m/sec^2] - real, intent(in) :: radiusInp ! particle radius [microns] - real, intent(in) :: rhopInp ! soil class density [kg/m^3] real, dimension(:,:,:), intent(inout) :: int_qa ! aerosol [kg/kg] real, pointer, dimension(:,:,:), intent(in) :: tmpu ! temperature [K] real, pointer, dimension(:,:,:), intent(in) :: rhoa ! air density [kg/m^3] @@ -1133,13 +1132,11 @@ subroutine Chem_SettlingSimple ( km, klid, flag, cdt, grav, & ! !DESCRIPTION: Gravitational settling of aerosol between vertical ! layers. Assumes input radius in [m] and density (rhop) -! in [kg m-3]. If flag is set, use the Fitzgerald 1975 (flag = 1) -! or Gerber 1985 (flag = 2) parameterization to update the -! particle radius for the calculation (local variables radius -! and rhop). +! in [kg m-3]arrays from the optics files. ! ! !REVISION HISTORY: -! +! 02Jan2024 Collow Removed calls to particle swelling and added +! interpolation based on RH ! 17Sep2004 Colarco Strengthen sedimentation flux out at surface ! by setting removal to be valid from middle of ! surface layer @@ -1200,10 +1197,10 @@ subroutine Chem_SettlingSimple ( km, klid, flag, cdt, grav, & enddo ! If radius le 0 then get out - if(radiusInp .le. 0.) then - status = 100 - __RETURN__(STATUS) - end if +! if(radiusInp .le. 0.) then +! status = 100 +! __RETURN__(STATUS) +! end if ! Find the column dry mass before sedimentation do k = klid, km @@ -1214,22 +1211,23 @@ subroutine Chem_SettlingSimple ( km, klid, flag, cdt, grav, & enddo enddo -! Particle swelling - call ParticleSwelling(i1, i2, j1, j2, km, rh, radiusInp, rhopInp, radius, rhop, flag) - +! Find radius and density of the wet particle + call mie%Query(550e-9,bin, & + qa*delp/grav, & + rh, reff=radius, rhop=rhop, __RC__) ! Settling velocity of the wet particle do k = klid, km do j = j1, j2 do i = i1, i2 - call Chem_CalcVsettle(radius(i,j,k), rhop(i,j,k), rhoa(i,j,k), & + call Chem_CalcVsettle(radius(i,j,k)*1.e-6, rhop(i,j,k), rhoa(i,j,k), & tmpu(i,j,k), vsettle(i,j,k), grav) end do end do end do - + if(present(correctionMaring)) then if (correctionMaring) then - vsettle = max(1.0e-9, vsettle - v_upwardMaring) + vsettle = max(1.0e-9, vsettle - v_upwardMaring) endif endif @@ -1252,7 +1250,6 @@ subroutine Chem_SettlingSimple ( km, klid, flag, cdt, grav, & if( associated(fluxout) ) then fluxout(:,:) = (cmass_before - cmass_after)/cdt endif - int_qa = qa __RETURN__(__SUCCESS__) @@ -1279,7 +1276,7 @@ subroutine Chem_Settling ( km, klid, bin, flag, cdt, grav, & integer, intent(in) :: flag ! flag to control particle swelling (see note) real, intent(in) :: cdt real, intent(in) :: grav ! gravity [m/sec^2] - real, intent(in) :: radiusInp ! particle radius [microns] + real, intent(in) :: radiusInp ! particle radius [meters] (converted from microns in call to function) real, intent(in) :: rhopInp ! soil class density [kg/m^3] real, dimension(:,:,:), intent(inout) :: int_qa ! aerosol [kg/kg] real, pointer, dimension(:,:,:), intent(in) :: tmpu ! temperature [K] diff --git a/Process_Library/MieQuery.H b/Process_Library/MieQuery.H index 51db0438..86abd73b 100644 --- a/Process_Library/MieQuery.H +++ b/Process_Library/MieQuery.H @@ -118,6 +118,10 @@ rEff = 1.E6* __RHINTERP2__(this%rEff, irh, arh, bin, rEff) endif + if(present(rhop)) then + rhop = __RHINTERP2__(this%rhop, irh, arh, bin, rhop) + endif + if(present(p11)) then p11 = __RHINTERP3__(this%p11, irh, arh, channel, bin, p11) endif