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

CH4/carbon simulation updates: (1) Use 0.1 degree mask files; (2) Prevent reading the same variable from disk more than once #2272

Merged
merged 9 commits into from
May 1, 2024

Conversation

yantosca
Copy link
Contributor

@yantosca yantosca commented Apr 29, 2024

Name and Institution (Required)

Name: Bob Yantosca
Institution: Harvard + GCST

Confirm you have reviewed the following documentation

Describe the update

This PR does the following:

  1. Replaces the existing 0.01 x 0.01 degree mask files for the Scarpelli_Canada, Scarpelli_Mexico, and GHGI CH4 emissions with 0.1 x 0.1 degree mask files. Using the higher-resolution mask files was causing a I/O bottleneck in GCHP due to the large number of grid points in the file.

  2. Update the HEMCO_Config.rc files so that the *COAST* entries are piggybacked onto the preceding entry. In other words, change this:

(((Scarpelli_Canada
0 CAN_OIL_GAS_COMBUSTION  $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_oil_gas_combustion_2018.nc  oil_gas_combustion_total  2018/1/1/0 C xy kg/m2/s CH4 1002 1/2 100
0 CAN_OIL_GAS_LEAKAGE     $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_oil_gas_leakage_2018.nc     oil_gas_leakage_total     2018/1/1/0 C xy kg/m2/s CH4 1002 1/2 100
0 CAN_OIL_GAS_VENT_FLARE  $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_oil_gas_vent_flare_2018.nc  oil_gas_vent_flare_total  2018/1/1/0 C xy kg/m2/s CH4 1002 1/2 100
0 CAN_COAL                $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_coal_2018.nc                coal_total                2018/1/1/0 C xy kg/m2/s CH4 1002 3   100
0 CAN_LIVESTOCK           $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_livestock_2018.nc           livestock_total           2018/1/1/0 C xy kg/m2/s CH4 1002 4   100
0 CAN_SOLID_WASTE         $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_solid_waste_2018.nc         solid_waste_total         2018/1/1/0 C xy kg/m2/s CH4 1002 5   100
0 CAN_WASTEWATER          $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_wastewater_2018.nc          wastewater_total          2018/1/1/0 C xy kg/m2/s CH4 1002 6   100
0 CAN_OTHER               $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_other_minor_sources_2018.nc other_minor_sources_total 2018/1/1/0 C xy kg/m2/s CH4 1002 8   100

### Make sure to include offshore/coastal emissions (Hier=1 to add to EDGAR, Hier=5 to add to GFEI) ###
0 CAN_OIL_GAS_COMBUSTION_COAST  $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_oil_gas_combustion_2018.nc  oil_gas_combustion_total  2018/1/1/0 C xy kg/m2/s CH4 1011 1/2 5
0 CAN_OIL_GAS_LEAKAGE_COAST     $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_oil_gas_leakage_2018.nc     oil_gas_leakage_total     2018/1/1/0 C xy kg/m2/s CH4 1011 1/2 5
0 CAN_OIL_GAS_VENT_FLARE_COAST  $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_oil_gas_vent_flare_2018.nc  oil_gas_vent_flare_total  2018/1/1/0 C xy kg/m2/s CH4 1011 1/2 5
0 CAN_COAL_COAST                $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_coal_2018.nc                coal_total                2018/1/1/0 C xy kg/m2/s CH4 1011 3   5
0 CAN_LIVESTOCK_COAST           $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_livestock_2018.nc           livestock_total           2018/1/1/0 C xy kg/m2/s CH4 1011 4   1
0 CAN_SOLID_WASTE_COAST         $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_solid_waste_2018.nc         solid_waste_total         2018/1/1/0 C xy kg/m2/s CH4 1011 5   1
0 CAN_WASTEWATER_COAST          $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_wastewater_2018.nc          wastewater_total          2018/1/1/0 C xy kg/m2/s CH4 1011 6   1
0 CAN_OTHER_COAST               $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_other_minor_sources_2018.nc other_minor_sources_total 2018/1/1/0 C xy kg/m2/s CH4 1011 8   1
)))Scarpelli_Canada

to this

(((Scarpelli_Canada
0 CAN_OIL_GAS_COMBUSTION        $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_oil_gas_combustion_2018.nc  oil_gas_combustion_total  2018/1/1/0 C xy kg/m2/s CH4 1002 1/2 100
0 CAN_OIL_GAS_COMBUSTION_COAST  -                                                                        -                         -          - -  -       CH4 1011 1/2 5
0 CAN_OIL_GAS_LEAKAGE           $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_oil_gas_leakage_2018.nc     oil_gas_leakage_total     2018/1/1/0 C xy kg/m2/s CH4 1002 1/2 100
0 CAN_OIL_GAS_LEAKAGE_COAST     -                                                                        -                         -          - -  -       CH4 1011 1/2 5
0 CAN_OIL_GAS_VENT_FLARE        $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_oil_gas_vent_flare_2018.nc  oil_gas_vent_flare_total  2018/1/1/0 C xy kg/m2/s CH4 1002 1/2 100
0 CAN_OIL_GAS_VENT_FLARE_COAST  -                                                                        -                         -          - -  -       CH4 1011 1/2 5
0 CAN_COAL                      $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_coal_2018.nc                coal_total                2018/1/1/0 C xy kg/m2/s CH4 1002 3   100
0 CAN_COAL_COAST                -                                                                        -                         -          - -  -       CH4 1011 3   5
0 CAN_LIVESTOCK                 $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_livestock_2018.nc           livestock_total           2018/1/1/0 C xy kg/m2/s CH4 1002 4   100
0 CAN_LIVESTOCK_COAST           -                                                                        -                         -          - -  -       CH4 1011 4   1
0 CAN_SOLID_WASTE               $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_solid_waste_2018.nc         solid_waste_total         2018/1/1/0 C xy kg/m2/s CH4 1002 5   100
0 CAN_SOLID_WASTE_COAST         -                                                                        -                         -          - -  -       CH4 1011 5   1
0 CAN_WASTEWATER                $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_wastewater_2018.nc          wastewater_total          2018/1/1/0 C xy kg/m2/s CH4 1002 6   100
0 CAN_WASTEWATER_COAST          -                                                                        -                         -          - -  -       CH4 1011 6   1
0 CAN_OTHER                     $ROOT/CH4/v2022-01/Scarpelli_Canada/can_emis_other_minor_sources_2018.nc other_minor_sources_total 2018/1/1/0 C xy kg/m2/s CH4 1002 8   100
0 CAN_OTHER_COAST               -                                                                        -                         -          - -  -       CH4 1011 8   1

etc. for other relevant inventories. This will prevent having to read the same variable from each file twice, and should result in a performance benefit

  1. New mask files will be placed in ExtData/HEMCO/v2024-04/, and will soon be available on the s3://gcgrid and WashU data portal.

Related Github Issue(s)

Tagging @kbowman77 @hannahnesser

run/GCHP/ExtData.rc.templates/ExtData.rc.carbon
- Fixed several time refresh entries for GHGI_EE containers (several
  should have been monthly refresh but were only read once).
- Fixed time refresh entries for all GHGI scale factors (these were
  listed as daily but should be monthly)
- Removed the obsolete UPDATED_GFED_CH4 container name

CHANGELOG.md
- Updated accordingly
This updates the bugfix/carbon-gchp-extdata branch to 14.4.0-alpha.13,
which is the head of dev/14.4.0 branch at time of this writing.

Signed-off-by: Bob Yantosca <[email protected]>
This PR merges the most recent commits as of PR #2217 back into
the bugfix/carbon-gchp-extdata branch.  This is necessary as there were
some additional fixes for the carbon simulation in PR #2266.

Signed-off-by: Bob Yantosca <[email protected]>
run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.CH4
run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.carbon
run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.tagCH4
- *COAST* entries are now placed beneath the corresponding emission
  entries and use placeholder "-" characters for file, variable,
  CRE, dimension, and units.  This allows us to only read each variable
  from the file once and then to reuse it immediately.
- Now use smaller mask files (0.1 degree instead of 0.01 degree)
  in HEMCO/MASKS/v2024-04 for Mexico, Canada, and CONUS regions.
  This should relieve a data I/O bottleneck.

run/GCHP/ExtData.rc.templates/ExtData.rc
- Remove entries for *COAST*, as this was causing duplicate file/variable
  reading from disk.

CHANGELOG.md
- Updated accordingly

Signed-off-by: Bob Yantosca <[email protected]>
run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.CH4
run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.carbon
- Bug fix: Replace missing *COAST* entries for GHGI Gas, which now
  are placed underneath the existing entries so that we do not have
  to read the same file twice.

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca yantosca added topic: Input Data Related to input data topic: Configuration Files Related to GEOS-Chem configuration files topic: Performance Related to GEOS-Chem speed, memory, or parallelization Attn: Carbon gases WG category: Bug Fix Fixes a previously-reported bug topic: Carbon Gases Simulations Related to simulations with carbon gases (carbon, CO2, CH4, tagCH4, tagCO) labels Apr 29, 2024
@yantosca yantosca added this to the 14.4.0 milestone Apr 29, 2024
@yantosca yantosca requested a review from msulprizio April 29, 2024 20:44
@yantosca yantosca self-assigned this Apr 29, 2024
run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.CH4
run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.carbon
run/GCHP/HEMCO_Config.rc.templates/HEMCO_Config.rc.carbon
- Fix minor formatting issues.  Mostly adding missing "-" characters
  in piggybacked entries.

Signed-off-by: Bob Yantosca <[email protected]>
Copy link
Contributor

@msulprizio msulprizio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filenames in several HEMCO_Config.rc files need to be changed to use resolution string 01x01 instead of 001x001 for consistency with the changes in ExtData.rc.carbon.

Also, changes are made to several GEOS input files. Are those intended? Are they reverting changes made in #2249?

run/GCHP/HEMCO_Config.rc.templates/HEMCO_Config.rc.carbon Outdated Show resolved Hide resolved
run/GEOS/GEOSCHEMchem_GridComp.rc Outdated Show resolved Hide resolved
run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.CH4
run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.carbon
run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.tagCH4
run/GCHP/HEMCO_Config.rc.templates/HEMCO_Config.rc.carbon
- Fix incorrect comment character in GHGI section ("$" -> "#")
- Add missing hierarchy value "5" for GHGI_COAST_OIL_EXPLORATION
- Fix typos in mask file names ("001x001" -> "01x01"; "01x00" -> "01x01")

run/GCHP/ExtData.rc.carbon
- Fix typos in container names (replace "__" with "_"), to be consistent
  with the edits in HEMCO_Config.rc.

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca yantosca requested a review from msulprizio April 30, 2024 14:45
@yantosca
Copy link
Contributor Author

@msulprizio: I fixed the remaining issues in the config files and am rerunning integration tests. Stay tuned for results.

Copy link
Contributor

@msulprizio msulprizio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes @yantosca. This PR looks good to merge now.

Do you have a summary on how this improves memory and/or run time? If so, it would be nice to include that info here and/or in #2268 for future reference.

Copy link
Contributor Author

@msulprizio: I will have a better idea once the integration tests finish. I can look at the timing information w/r/t the previous integration test.

run/GCHP/HEMCO_Config.rc.templates/HEMCO_Config.rc.carbon
- Added missing "-" for GHGI_COAST_LIVESTOCK_END under units column

Signed-off-by: Bob Yantosca <[email protected]>
run/GCHP/ExtData.rc.templates/ExtData.rc.carbon
- Add missing GHGI_EE_GAS_POSTMETER entry
- Replace "-" time refresh entries with "F%y4-01-01T00:00:00" in
  GHGI_EE* entries, as there is data for 2012-2018.
- Re-aligned Scarpelli_Canada and Scarpelli_Mexico entries to
  reduce whitespace

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca
Copy link
Contributor Author

yantosca commented Apr 30, 2024

I've fixed some issues in the GHGI_EE* entries in ExtData.rc.carbon and have merged into 14.4.0 (locally) so that I can run integration tests. Stay tuned for results.

@yantosca
Copy link
Contributor Author

yantosca commented May 1, 2024

All GEOS-Chem Classic integration tests passed:

==============================================================================
GEOS-Chem Classic: Execution Test Results

GCClassic #041c5d6 GEOS-Chem submod update: Merge PR #2281 (Change input file paths for GEOS)
GEOS-Chem #7dad2686f Merge PR #2272 (CH4/carbon simulation updates)
HEMCO     #fddcae5 Update version to 3.8.1 for release

Using 24 OpenMP threads
Number of execution tests: 29

Submitted as SLURM job: 30237963
==============================================================================

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%  All execution tests passed!  %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@yantosca
Copy link
Contributor Author

yantosca commented May 1, 2024

Due to cluster issues, I ran a "quick" set of GCHP integration tests (as this PR only affects the CH4/carbon simulations). All tests passed.

==============================================================================
GCHP: Execution Test Results

GCHP      #dfe6a3e GEOS-Chem submod update: Merge PR #2281 (Change input file paths for GEOS)
GEOS-Chem #7102094f5 Merge PR #2272 (CH4/carbon simulation updates)
HEMCO     #

Number of execution tests: 7

Submitted as SLURM job: 30324185
==============================================================================
 
Execution tests:
------------------------------------------------------------------------------
gchp_merra2_carbon..................................Execute Simulation....PASS
gchp_merra2_carbon_CH4..............................Execute Simulation....PASS
gchp_merra2_carbon_CO...............................Execute Simulation....PASS
gchp_merra2_carbon_CO2..............................Execute Simulation....PASS
gchp_merra2_carbon_OCS..............................Execute Simulation....PASS
gchp_merra2_tagO3...................................Execute Simulation....PASS
gchp_merra2_TransportTracers........................Execute Simulation....PASS
 
Summary of test results:
------------------------------------------------------------------------------
Execution tests passed: 7
Execution tests failed: 0
Execution tests not yet completed: 0

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%  All execution tests passed!  %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@yantosca yantosca merged commit 7102094 into dev/14.4.0 May 1, 2024
@yantosca yantosca deleted the bugfix/carbon-gchp-extdata branch May 1, 2024 14:23
yantosca added a commit that referenced this pull request May 1, 2024
This merge grings PR #2236 (Parameterized Effective Radius for SNA and OM,
by @Haihui-Zhu) atop the PR #2272 (CH4/carbon simulation fixes).

PR #2236 implements a parameterized effective radius for SNA and OM and
updates AOD calculation to account for the spatial and temporal variation in
dry effective radius.

Signed-off-by: Bob Yantosca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Fix Fixes a previously-reported bug topic: Carbon Gases Simulations Related to simulations with carbon gases (carbon, CO2, CH4, tagCH4, tagCO) topic: Configuration Files Related to GEOS-Chem configuration files topic: Input Data Related to input data topic: Performance Related to GEOS-Chem speed, memory, or parallelization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.001 x 0.001 degree masks cause performance slowdown in GCHP for carbon simulations
2 participants