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

Move aerosol_mod.F90 arrays to State_Chm%AerMass object #2015

Merged
merged 7 commits into from
Dec 5, 2023

Conversation

lizziel
Copy link
Contributor

@lizziel lizziel commented Oct 27, 2023

Name and Institution (Required)

Name: Lizzie Lundgren
Institution: Harvard University

Describe the update

This PR moves all gridded module arrays in aerosol_mod.90 to new derived type object State_Chm%AerMass. Updates include:

  1. Created new file aermass_container_mod.F90 to hold gridded arrays previously in aerosol_mod.F90, e.g. OCFPOA, BCPO, and other aerosol mass arrays computed in Aerosol_Conc subroutine
  2. Created new derived type AerMassContainer defined in the new file
  3. Created State_Chm%AerMass to point to the AerMassContainer object
  4. Code updates to access the aerosol mass arrays via the State_Chm pointer, e.g. State_Chm%AerMass%OCFPOA
  5. Removal of aerosol_mod.F90 subroutine Cleanup_Aerosol
  6. Moved diagnostic submodule Set_AerMass_Diagnostic in aerosol_mod.F90 to be stored instead in diagnostics_mod.F90
  7. Remove obsolete oasave.F90 and code that references it
  8. Removed the Transport library from GeosCore/CMakeLists.txt

Regarding the last update, removal of the Transport library, this CMake code was put in years ago with the intention of making it easier to include GEOS-Chem in external models without GEOS-Chem Classic transport. However, the files in the library are built before other GeosCore files and include diagnostics_mod.F90 and calc_met_mod.F90. Excluding this built library in models would therefore break GEOS-Chem. The presence of this library also prevents using non-transport GeosCore modules within diagnostics_mod.F90, a problem that came up during this aerosols update. In practice we do not need this separately built library when porting GEOS-Chem to other models. There are simpler ways of not building the transport files for all cases thus far.

This is a zero diff update but I would like it to go into 14.3.0 so that it can be used in the interface to Cloud-J.

All integration tests passed for GC-Classic and GCHP except the TOMAS simulations which is a known issue unrelated to this update.

Expected changes

This is a no diff update for all simulations.

Reference(s)

None

Related Github Issue(s)

closes #1418

@lizziel lizziel marked this pull request as ready for review October 31, 2023 16:21
@lizziel lizziel requested review from msulprizio and yantosca and removed request for msulprizio October 31, 2023 16:23
@lizziel lizziel changed the base branch from main to dev/14.3.0 October 31, 2023 16:25
@lizziel
Copy link
Contributor Author

lizziel commented Oct 31, 2023

Tagging Aerosol WG Co-Chairs: @beckyalexander, @theloniuspunk, @wporter. Let me know if you have any questions/concerns.

Copy link
Contributor

@yantosca yantosca left a comment

Choose a reason for hiding this comment

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

Mostly looks good. I made a couple of review comments under Files Changed. Let me know what you think @lizziel.

GeosCore/diagnostics_mod.F90 Outdated Show resolved Hide resolved
Headers/aermass_container_mod.F90 Outdated Show resolved Hide resolved
Headers/aermass_container_mod.F90 Show resolved Hide resolved
@lizziel lizziel changed the base branch from dev/14.3.0 to main November 15, 2023 21:47
…te_Chm

Updates include:
 - New file aermass_container_mod.F90 to hold gridded arrays previously
   in aerosol_mod.F90, e.g. OCFPOA, BCPO, and other aerosol mass arrays
   computed in Aerosol_Conc
 - New derived type AerMassContainer defined in the new file
 - State_Chm%AerMass to point to the AerMassContainer object
 - Code updates to access the aerosol mass arrays via the State_Chm
   pointer, e.g. State_Chm%AerMass%OCFPOA
 - Removal of aerosol_mod.F90 subroutine Cleanup_Aerosol
 - Moved diagnostic submodule Set_AerMass_Diagnostic in aerosol_mod.F90
   to be stored instead in diagnostics_mod.F90
 - Remove the Transport library from GeosCore/CMakeLists.txt

A note on the last update, to remove the Transport library from GeosCore:
This code was put in years ago with the intention of making it easier to
include GEOS-Chem in external models without GEOS-Chem Classic transport.
However, the files in the library are built before GeosCore and include
diagnostics_mod.F90. Excluding this built library in models would prevent
using GEOS-Chem diagnostics. It also prevents using non-transport GeosCore
modules within diagnostics_mod.F90, a problem that came up during this
aerosols update. In practice we do not need this separately built library
when porting GEOS-Chem to other models. There are simpler ways of not
building the transport files for all cases thus far.

Signed-off-by: Lizzie Lundgren <[email protected]>
In updating the aerosol mass arrays I changes code within oasave.F90.
However, we actually do not need this anymore since it is for obsolute
binary diagnostics. I am thus removing the file and the code that uses
it.

Signed-off-by: Lizzie Lundgren <[email protected]>
@lizziel lizziel force-pushed the feature/move_aerosol_mod_arrays_to_state_chm branch from e74b04e to e749e5e Compare November 15, 2023 22:14
@lizziel
Copy link
Contributor Author

lizziel commented Nov 15, 2023

Thanks for the feedback @yantosca! I made the updates and now have it on top of the no-diff branch. Please review again at your convenience.

@lizziel lizziel changed the base branch from main to dev/no-diff-to-benchmark November 15, 2023 22:26
…_arrays_to_state_chm

# Conflicts:
#	CHANGELOG.md

Signed-off-by: Lizzie Lundgren <[email protected]>
@yantosca yantosca changed the base branch from dev/no-diff-to-benchmark to dev/14.3.0 December 1, 2023 20:41
Copy link
Contributor

@yantosca yantosca left a comment

Choose a reason for hiding this comment

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

Thanks @lizziel! Good to merge.

@msulprizio msulprizio self-assigned this Dec 4, 2023
@msulprizio msulprizio added this to the 14.3.0 milestone Dec 4, 2023
@msulprizio msulprizio merged commit 7095e9b into dev/14.3.0 Dec 5, 2023
@msulprizio msulprizio deleted the feature/move_aerosol_mod_arrays_to_state_chm branch December 5, 2023 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Feature Request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Move aerosol module variables to State_Chm
3 participants