Skip to content

Add variable dimensions to available_diags file#864

Merged
Hallberg-NOAA merged 1 commit into
NOAA-GFDL:dev/gfdlfrom
jkrasting:enhance_avail_diags
Mar 27, 2025
Merged

Add variable dimensions to available_diags file#864
Hallberg-NOAA merged 1 commit into
NOAA-GFDL:dev/gfdlfrom
jkrasting:enhance_avail_diags

Conversation

@jkrasting
Copy link
Copy Markdown

The output of the current available_diags file lacks the dimensions of each diagnostic.

This PR includes a commit that adds the appropriate horizontal and vertical dimension names to the entries listed in the available_diags file. Scalar diagnostics are denoted with a "scalar" string.

Example of an entry generated with the new code:

"temp"  [Used] (CMOR equivalent is "thetao")
    ! modules: {ocean_model,ocean_model_z,ocean_model_rho2,ocean_model_rho0,ocean_model_d2,ocean_model_z_d2,ocean_model_rho2_d2,ocean_model_rho0_d2}
    ! dimensions: yh, xh, zl
    ! long_name: Potential Temperature
    ! units: degC
    ! cell_methods: xh:mean yh:mean zl:mean area:mean
    ! variants: {temp,temp_xyave,thetao,thetao_xyave}

Comment thread src/framework/MOM_diag_mediator.F90 Outdated
@marshallward
Copy link
Copy Markdown
Member

Apologies for moving the goalposts, but if we're considering revisions to available_diags, then we could also convert it to YAML:

temp:
    used: True
    cmor_equivalent: thetao
    modules: [ocean_model, ocean_model_z, ocean_model_rho2, ocean_model_rho0, ocean_model_d2, ocean_model_z_d2, ocean_model_rho2_d2, ocean_model_rho0_d2]
    dimensions: [yh, xh, zl]
    long_name: Potential Temperature
    units: degC
    cell_methods: [xh:mean, yh:mean, zl:mean, area:mean]
    variants: [temp, temp_xyave, thetao, thetao_xyave]

This would make postprocessing easier for many people.

@jkrasting jkrasting force-pushed the enhance_avail_diags branch 3 times, most recently from 9baedf5 to 1efc7ed Compare March 27, 2025 13:00
Adds appropriate horizontal and vertical dimension names to the
entries listed in the available_diags file. Scalar diagnostics
are denoted with a "scalar" string.
@jkrasting jkrasting force-pushed the enhance_avail_diags branch from 1efc7ed to 75307c5 Compare March 27, 2025 13:22
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 27, 2025

Codecov Report

Attention: Patch coverage is 51.51515% with 16 lines in your changes missing coverage. Please review.

Project coverage is 36.79%. Comparing base (0daa4ff) to head (75307c5).
Report is 1 commits behind head on dev/gfdl.

Files with missing lines Patch % Lines
src/framework/MOM_diag_mediator.F90 51.51% 0 Missing and 16 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           dev/gfdl     #864      +/-   ##
============================================
- Coverage     38.01%   36.79%   -1.22%     
============================================
  Files           298      290       -8     
  Lines         87986    86927    -1059     
  Branches      16521    16524       +3     
============================================
- Hits          33447    31989    -1458     
- Misses        48483    48834     +351     
- Partials       6056     6104      +48     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jkrasting jkrasting requested a review from Hallberg-NOAA March 27, 2025 13:35
@jkrasting
Copy link
Copy Markdown
Author

@Hallberg-NOAA - I reordered the dimensions and improved the string trimming logic as you suggested.

Copy link
Copy Markdown
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

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

These proposed changes look good to me. Thank you for this valuable new contribution.

@Hallberg-NOAA Hallberg-NOAA added the enhancement New feature or request label Mar 27, 2025
@Hallberg-NOAA
Copy link
Copy Markdown
Member

This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/26893 with the expected warnings about changes to the available diags file metadata.

@Hallberg-NOAA Hallberg-NOAA merged commit 74f5474 into NOAA-GFDL:dev/gfdl Mar 27, 2025
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.

3 participants