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

SU_Volcanic: file path and protection for missing file #294

Merged
merged 2 commits into from
Oct 15, 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
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
Loading