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

Updates for GEOS-Chem #2

Merged
merged 37 commits into from
Mar 18, 2024
Merged

Updates for GEOS-Chem #2

merged 37 commits into from
Mar 18, 2024

Conversation

lizziel
Copy link
Contributor

@lizziel lizziel commented Apr 28, 2023

Name and Institution (Required)

Name: Lizzie Lundgren
Institution: Harvard University

Describe the update

This PR brings into the main branch all remaining changes made during development of Cloud-J for use in GEOS-Chem. This includes changes for using GEOS-Chem with Cloud-J photolysis in multiple configurations: GEOS-Chem Classic, GCHP, GEOS, and CESM. It also includes several bug fixes for compatibility with GNU and Intel compilers, and one Cloud-J standalone bug fix for computing ice water path input to Cloud_JX. This PR also includes a change in expected spacing of entries in input file FJX_scat-aer.dat which will affect Cloud-J standalone users who have custom LUTs outside of the ones stored in this repository.

Expected changes

See the Changelog (new file added in this PR) for details of all changes in Cloud-J.

Reference(s)

None

Tagging @pratherUCI for review

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
This update enables storing the tables anywhere on the user's system
rather than in Cloud-J.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
All Cloud_JX arguments are now listed in an easy to read format. Arguments
CLDFLAG, LNRG, and NRANDO are removed as arguments since they are set
during initialization as global, and remain constant during the run,
and so do not need to be passed for use.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
FP is reserved for flexible precision in GEOS-Chem.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
This fix avoids a run error when using gfortran

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
This update is needed to accomodate values used in GEOS-Chem

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
… to 7

This update is needed to accomodate values used in GEOS-Chem

This update also includes reformatting this section for more consistent
indenting.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
…alues

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
…loud-J

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
This commit also adds print logical as input argument to some of these
subroutines to be available for debugging.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
lizziel and others added 12 commits October 17, 2023 10:23
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Fix ANU declaration after use for ifort compatibility
…ation

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
@lizziel
Copy link
Contributor Author

lizziel commented Mar 1, 2024

Merging this in is on the back-burner because it will break compatibility with the Cloud-J standalone tables files.

These are no diff updates

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
@lizziel
Copy link
Contributor Author

lizziel commented Mar 11, 2024

This PR is almost ready for review. I pushed the latest updates for GEOS-Chem in offline, GEOS, and CESM and now need to address the resulting conflicts in the standalone model.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Spaces were added in several columns. See github history
or code comments in cldj_init_mod.F90 for details.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
@lizziel lizziel marked this pull request as ready for review March 13, 2024 21:13
@lizziel lizziel added the enhancement New feature or request label Mar 13, 2024
@lizziel
Copy link
Contributor Author

lizziel commented Mar 14, 2024

This PR is now ready for review. I confirmed that the changes cause no differences in Cloud-J standalone output when using default settings.

@lizziel lizziel self-assigned this Mar 14, 2024
@yantosca yantosca mentioned this pull request Mar 14, 2024
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.

Hi @lizziel, thanks for this. I made several minor comments about mostly formatting, precision, and array initialization issues. Let me know if you have any more questions.

src/Core/cldj_error_mod.F90 Show resolved Hide resolved
src/Core/cldj_fjx_sub_mod.F90 Show resolved Hide resolved
src/Core/cldj_fjx_sub_mod.F90 Show resolved Hide resolved
src/Core/cldj_fjx_sub_mod.F90 Show resolved Hide resolved
src/Core/cldj_fjx_sub_mod.F90 Show resolved Hide resolved
src/Core/cldj_fjx_sub_mod.F90 Show resolved Hide resolved
src/Core/cldj_fjx_sub_mod.F90 Show resolved Hide resolved
src/Core/cldj_osa_sub_mod.F90 Show resolved Hide resolved
src/Core/cldj_sub_mod.F90 Show resolved Hide resolved
src/Core/cldj_sub_mod.F90 Show resolved Hide resolved
@yantosca yantosca self-requested a review March 14, 2024 16:50
@lizziel
Copy link
Contributor Author

lizziel commented Mar 14, 2024

Thanks @yantosca for your detailed review! I tried to keep the Cloud-J as close to the original as possible to avoid divergence. Your comments will be very helpful when we go through and do general improvements to the code.

@pratherUCI, once we start making general code improvements it will be more difficult to bring in updates you have based on older versions. Would you be able to start working off of this version (once merged) moving forward to avoid problems down the road?

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. I agree, we can make no-diff updates later. No need to hold up this PR. Good to merge!

@pratherUCI
Copy link
Collaborator

I went thru all the changes. They make sense and indeed help. I approve.
Michael

There is no reason why the standalone version that I continue to develop could not now begin with the new version.

There are two remaining issues for us:

  1. The next version of Cloud-J standalone is v8.0c, it has been changed (minorly) to include H2O absorption. At the time I also went through all the old commons and removed dead variables (as you did). I will check my list. So how is best to proceed.
    BTW, this code enabled me to include NO2 absorption (small effects vs H2O). The major change is in one input table, a few lines of code, and then the clean up. This is not urgent, the only change is the H2O abs.
    Prather, Michael (2023). An updated cloud-overlap photolysis module for atmospheric chemistry models, UCI Cloud-J v8.0, with near-UV H2O absorption [Dataset]. Dryad. https://doi.org/10.7280/D1Q398

  2. I have intentionally ignored development for the aerosol code until there was a reason to update. GEOS Chem should have updated aerosol tables that address rel hum, etc. We need someone who is interested in the aerosol simulations and I can work with them.

Michael

@lizziel
Copy link
Contributor Author

lizziel commented Mar 18, 2024

Hi @pratherUCI, thanks for reviewing the code. I will create a new GitHub issue to discuss putting in the next version of Cloud-J.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants