-
Notifications
You must be signed in to change notification settings - Fork 8
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
Eliminate repeated diagnostic ID checks and refactor send_diag section #23
Conversation
This PR addresses all the comments from reviewers and is up-to-date with the main branch. Please review it again, and feel free to provide any further comments, thanks. |
Thanks for all of your hard work on the Yi-Cheng, all. It looks good from my end. |
Thanks, @charliestock. I've also merged #39 into this PR. It's ready for merging once one of you approves it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me Yi-Cheng. Why don't we move forward with merging and discuss further at the doc and dev tomorrow.
This PR addresses issue #14. Several code changes are included:
generic_COBALT_update_from_source
andgeneric_COBALT_update_from_bottom
subroutines .cobalt_glbl.F90
and movedphytoplankton
,zooplankton
,bacteria
, andgeneric_cobalt
data types as well asnamelist
here.cobalt_send_diag.F90
and added a new subroutinecobalt_send_diagnostics
to thecobalt_send_diag
module to handle send_diag calls separately.cobalt_send_diagnostics_bottom
to thecobalt_send_diag
module to handle send_diag calls for bottom fluxes.generic_COBALT.F90
from16169
to11484
(a28.91
% reduction).11.50
seconds versus11.60
seconds, representing an approximate0.87
% increase.I'm still keeping the
do_14c
option and all the diagnostics related to radiocarbon. We can remove them later if we decide to go in that direction.This PR should not change baselines (passed CI test) and can produce b2b diagnostic netCDF files.
Eventually we could apply this refactoring to the majority of existing generic_COBALT subroutines (e.g., PR #22 ), which will enhance the clarity and conciseness of the main COBALT code.