marbl-ecosys / MARBL

Marine Biogeochemistry Library
https://marbl-ecosys.github.io
Other
14 stars 25 forks source link

Code clean-up in new tracer indices #59

Open mnlevy1981 opened 8 years ago

mnlevy1981 commented 8 years ago

The main issue is that we want the tracer count comparison (OGCM vs MARBL) to be done in the driver, rather than MARBL. However, I have a few other small things that snuck through the code review...

    ! This subroutine sets the tracer indices for the non-autotroph tracers. To
    ! know where to start the indexing for the autotroph tracers, it increments
    ! tracer_cnt by 1 for each tracer that is included. Note that this gives an
    ! accurate count whether the carbon isotope tracers are included or not.

That is inaccurate, it sets tracer indices for ALL tracers.

mnlevy1981 commented 7 years ago

In my initial description I suggested

The consistency check that is currently in the routine marbl_mod:marbl_check_ecosys_tracer_count_consistency should be moved to part of the tracer index constructor routine (similar CISO consistency check is already there)

Instead, we have moved the CISO tracer index consistency check out of the indexing type.

However, the other three points still need addressing:

  1. marbl_internal_types:tracer_index_constructor description still mentions non-autotroph tracers instead of all tracers
  2. Base ecosystem class tracers are still referred to as "general" in both the marbl_tracer_index_type class definition and comments in marbl_internal_types:tracer_index_constructor
  3. marbl_mod:marbl_init_tracer_metadata still sets tracer_module_name to 'ecosys' instead of 'base'

Also, we have nine MARBL classes used to track various indices. marbl_tracer_index_type and marbl_living_tracer_index_type are in the minority by ending in index_type; the other seven (surface_forcing_diagnostics, surface_forcing, surface_forcing_output, surface_saved_state, interior_diagnostics, interior_forcing, and interior_saved_state) end with indexing_type and I think we should be consistent here. Speaking of consistency, surface_forcing_diagnostics vs interior_diagnostics...