From edf75ed93e649fccfebdd472ac9a3c05e39de3fc Mon Sep 17 00:00:00 2001 From: Peter Colarco Date: Fri, 2 Feb 2024 14:25:46 -0500 Subject: [PATCH 1/3] prc: update some logic in SU2G_GridCompMod --- CHANGELOG.md | 9 +++++++ .../SU2G_GridComp/SU2G_GridCompMod.F90 | 26 +++++++++++++------ 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25023cc6..729db7cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 index 6c4abc37..b56bbfc2 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 @@ -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(:,:,:) @@ -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) @@ -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 @@ -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 @@ -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, & @@ -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, & @@ -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, & From 1ee98d6fdb55f7ec7a09c01cc10bf33b3daa1b79 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 17 Sep 2024 07:36:03 -0400 Subject: [PATCH 2/3] Update yamllint action --- .github/workflows/validate_yaml_files.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate_yaml_files.yml b/.github/workflows/validate_yaml_files.yml index ff19b0d6..dfefbd9a 100644 --- a/.github/workflows/validate_yaml_files.yml +++ b/.github/workflows/validate_yaml_files.yml @@ -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 From cca12c549a3dcf787c76200d87056f03b8616c53 Mon Sep 17 00:00:00 2001 From: Virginie Buchard <48135170+vbuchard@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:11:46 -0400 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a32dc9f..4c0e7eb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -60,15 +62,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `soil_drylimit_factor` to the DU2G_instance_DU.rc and DU2G_GridCompMod.F90 files for FENGSHA - Moved process library macros to header file. -## [#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