Skip to content

Commit

Permalink
Merge pull request #294 from GEOS-ESM/feature/jrjoshi1/su2gvolcF
Browse files Browse the repository at this point in the history
SU_Volcanic: file path and protection for missing file
  • Loading branch information
vbuchard authored Oct 15, 2024
2 parents ffa44c7 + 81d1441 commit 5d3eff7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nbins: 4

# Volcanic pointwise sources
volcano_srcfilen_explosive: ExtData/chemistry/CARN/v202401/explosive/so2_explosive_volcanic_emissions_CARN_v202401.%y4%m2%d2.rc
volcano_srcfilen_degassing: ExtData/chemistry/CARN/v202401/so2_volcanic_emissions_CARN_v202401.degassing_only.rc
volcano_srcfilen_degassing: ExtData/chemistry/CARN/v202401/sfc/so2_volcanic_emissions_CARN_v202401.degassing_only.rc

# Heights [m] of LTO, CDS and CRS aviation emissions layers
aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3
Expand Down
16 changes: 11 additions & 5 deletions ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,6 @@ subroutine Run1 (GC, import, export, clock, RC)
! -----------------------------------------------
thread = MAPL_get_current_thread()
workspace => self%workspaces(thread)

! Update Volcanic SO2 Emissions Daily
if(workspace%nymd_last /= nymd) then
workspace%nymd_last = nymd
Expand All @@ -850,22 +849,29 @@ subroutine Run1 (GC, import, export, clock, RC)
if(index(self%volcano_srcfilen_degassing,'volcanic_') /= 0) then
call StrTemplate(fname, self%volcano_srcfilen_degassing, xid='unknown', &
nymd=nymd, nhms=120000 )
call ReadPointEmissions (nymd, fname, workspace%nVolc, workspace%vLat, workspace%vLon, &
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
workspace%vSO2 = workspace%vSO2 * fMassSO2 / fMassSulfur
end if
end if

! EXPLOSIVE: Get pointwise SO2 and altitude of volcanoes from a daily file data base
workspace%nVolcE = 0 ! case of /dev/null (no volcanoes) or ill-formed filename
if(index(self%volcano_srcfilen_explosive,'volcanic_') /= 0) then
call StrTemplate(fname, self%volcano_srcfilen_explosive, xid='unknown', &
nymd=nymd, nhms=120000 )
call ReadPointEmissions (nymd, fname, workspace%nVolcE, workspace%vLatE, workspace%vLonE, &
inquire(file=fname, exist=fileExists)
if (fileExists) then
call ReadPointEmissions (nymd, fname, workspace%nVolcE, workspace%vLatE, workspace%vLonE, &
workspace%vElevE, workspace%vCloudE, workspace%vSO2E, workspace%vStartE, &
workspace%vEndE, label='volcano', __RC__)
workspace%vSO2 = workspace%vSO2 * fMassSO2 / fMassSulfur
workspace%vSO2 = workspace%vSO2 * fMassSO2 / fMassSulfur
end if
end if

end if

! DEGASSING: Apply volcanic emissions
Expand Down
2 changes: 1 addition & 1 deletion ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_instance_SU.rc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nbins: 4

# Volcanic pointwise sources
volcano_srcfilen_explosive: /dev/null
volcano_srcfilen_degassing: ExtData/chemistry/CARN/v202401/so2_volcanic_emissions_CARN_v202401.degassing_only.rc
volcano_srcfilen_degassing: ExtData/chemistry/CARN/v202401/sfc/so2_volcanic_emissions_CARN_v202401.degassing_only.rc

# Heights [m] of LTO, CDS and CRS aviation emissions layers
aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3
Expand Down

0 comments on commit 5d3eff7

Please sign in to comment.