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

Enhancement/remove non living tracer cnt #165

Merged
merged 3 commits into from
May 31, 2017
Merged

Enhancement/remove non living tracer cnt #165

merged 3 commits into from
May 31, 2017

Conversation

mnlevy1981
Copy link
Collaborator

Remove the non_living_biomass_ecosys_tracer_cnt variable (see issue #137).

Testing: verified that the tracer names and metadata did not change with this refactor by running a single POP CECO (+ciso) comparison test on both Cheyenne (intel 17) and Hobart (nag); this testing did catch some initial typos, and one of the errors flagged (I had accidentally changed the ALK tracer to alk) also caught a typo in a MARBL error traceback.

marbl_init_tracer_metadata() passes non_living_biomass_ecosys_tracer_cnt to
marbl_init_non_autotroph_tracer_metadata(), where it is an intent out. However,
the variable is only used in the non_autotroph_tracer_metadata() [it is not
used after being returned], so I updated the interface accordingly.

Next commit will look at how to remove it altogether.
What was previously marbl_init_non_autotroph_tracer_metadata has been renamed
so that tracer is plural: marbl_init_non_autotroph_tracers_metadata; a new
marbl_init_non_autotroph_tracer_metadata routine has been introduced for
changing the metadata one tracer at a time. This removes the need for
non_living_biomass_ecosys_tracer_cnt, which was implicitly requiring that the
non-living biomass tracers had tracer indices 1 - N.

Also fixed a typo in an error traceback.
@mnlevy1981 mnlevy1981 self-assigned this May 26, 2017
@klindsay28
Copy link
Collaborator

If the comparison
if (n == alk_ind .or. n == alk_alt_co2_ind) then
in subroutine marbl_init_non_autotroph_tracer_metadata is changed to
if (short_name == 'ALK' .or. short_name == 'ALK_ALT_CO2') then
then the arguments marbl_tracer_indices and n can both be removed from the subroutine.

At that point, I call into question the need for (and usefulness of) the associate construct in subroutine marbl_init_non_autotroph_tracers_metadata. Each individual tracer index is only used once, and as you get deeper into the sequence of calls to marbl_init_non_autotroph_tracer_metadata, you separate the usage of the tracer index from its association into marbl_tracer_indices.

Removed a couple of un-necessary arguments from the subroutine interface, which
also let me remove an associate statement in
marbl_init_non_autotroph_tracers_metadata.
@mnlevy1981 mnlevy1981 merged commit de6564f into marbl-ecosys:master May 31, 2017
@mnlevy1981 mnlevy1981 deleted the enhancement/remove_non_living_tracer_cnt branch May 31, 2017 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants