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

Simplify changes to the generic tracer interface for cobalt-p4 #3

Merged
merged 4 commits into from
Jan 26, 2024

Conversation

yichengt900
Copy link

@yichengt900 yichengt900 commented Jan 23, 2024

The new cobalt-p4 requires several variables from MOM6 (e.g. geolat for day-length calculation as well as eqs_of_state for density calculation).

We revisited the original changes and removed unnecessary changes to minimize the generic tracer interface changes at MOM6 side. The results match those obtained from the original codes in the 1-D and NWA12 RT tests.

Dependency: NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC#8

@charliestock
Copy link

Hi YC, thanks. It looks the issue was that my original changes to get geolat and the information required for the equation of state calculation were, for lack of a better descriptor, "overkill". Your code modifications make this change much less disruptive. Thank you.

If I understand correctly, you were able to get these efficiencies by using the MOM_EOS variable rather than passing a broader set of thermodynamic variables, and by only passing them to "generic_tracer_source" subroutine in MOM_generic_tracer.F90. Am I right in thinking that the interface changes will thus be limited to this latter change?

best, Charlie

Copy link

@charliestock charliestock left a comment

Choose a reason for hiding this comment

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

Hi YC, this looks good. I added a comment to ensure that I fully understood the interface implications. However, since this is a clearly a cleaner approach and passes all the tests, please forge head with merging.

@yichengt900
Copy link
Author

Hi YC, thanks. It looks the issue was that my original changes to get geolat and the information required for the equation of state calculation were, for lack of a better descriptor, "overkill". Your code modifications make this change much less disruptive. Thank you.

If I understand correctly, you were able to get these efficiencies by using the MOM_EOS variable rather than passing a broader set of thermodynamic variables, and by only passing them to "generic_tracer_source" subroutine in MOM_generic_tracer.F90. Am I right in thinking that the interface changes will thus be limited to this latter change?

best, Charlie

Hi @charliestock, You've understood correctly. The focus of these changes is indeed on optimizing efficiency by utilizing the MOM_EOS variable and narrowing the modifications to the "generic_tracer_source" subroutine in MOM_generic_tracer.F90. The intention is to keep the interface changes confined to this specific aspect.

Our primary goal is to streamline the passing of necessary variables through "generic_tracer_source" to COBALT, minimizing broader code changes while achieving the required inputs for daylength and density calculations. I am open to further exploration of improved options for density variables in subsequent PR

@charliestock
Copy link

Thanks for the addition clarification YC, nice work!

@yichengt900
Copy link
Author

@charliestock , thanks! This PR has a dependency: NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC#8. It would be great if someone could also review it and provide comments or approval, so I can merge them simultaneously.

@yichengt900 yichengt900 merged commit 416e53b into dev/cefi Jan 26, 2024
@yichengt900 yichengt900 deleted the feature/g_tracer branch January 26, 2024 20:41
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.

2 participants