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

Add diag_mode to default diagnostics #462

Merged
merged 5 commits into from
May 16, 2024

Commits on May 9, 2024

  1. First try adding diag_mode to default diagnostics

    Introduce new diag_mode option to MARBL_generate_diagnostics_file.py; when
    diag_mode = 'none', output diagnostic file should be 'never_{op}' for all
    variables. When diag_mode = 'minimal', only variables with diag_mode =
    'minimal' in diagnostics_latest.json have non-never output frequencies. When
    diag_mode is 'full', variables with diag_mode = 'minimal' or 'full' will have
    non-never output frequencies.
    mnlevy1981 committed May 9, 2024
    Configuration menu
    Copy the full SHA
    ccb5031 View commit details
    Browse the repository at this point in the history
  2. Add more tests to run_test_suite.sh

    Call MARBL_generate_diagnostics_file.py with a few different --diag-mode
    options (and write output to different files)
    mnlevy1981 committed May 9, 2024
    Configuration menu
    Copy the full SHA
    1971bba View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. Clean up imports

    Previous commit let us call MARBL_generate_diagnostics_file.py from command
    line, but caused problems when importing generate_diagnostics_file() into a
    python script. This clean-up allows both use-cases.
    
    Also, I renamed diag_mode_opts() -> valid_diag_modes() because that seems like
    a more descriptive name.
    mnlevy1981 committed May 10, 2024
    Configuration menu
    Copy the full SHA
    a3d26cf View commit details
    Browse the repository at this point in the history
  2. Avoid never_average, never_average

    When generating the MARBL diagnostics file with diag_mode=minimal, some
    variables were being listed as "never_average, never_average" (and others were
    "medium_average, never_average"); we only need to add never_average to the
    freq_op list if that list is empty.
    mnlevy1981 committed May 10, 2024
    Configuration menu
    Copy the full SHA
    1e4714a View commit details
    Browse the repository at this point in the history

Commits on May 16, 2024

  1. Updates following code review

    1) Cleaned up docstring for valid_diag_modes
    2) Dropped valid_diag_modes from __init__.py
    3) Moved imports to top of MARBL_generate_diagnostics_file.py
       -- some are inside if __name__ == "__main__" block
       -- I snuck in a sys.path.append() in the middle of the imports to get
          MARBL_tools into the path
    mnlevy1981 committed May 16, 2024
    Configuration menu
    Copy the full SHA
    66275b1 View commit details
    Browse the repository at this point in the history