Skip to content

Add generic tracer budget diagnostics#12

Merged
yichengt900 merged 12 commits into
NOAA-CEFI-Regional-Ocean-Modeling:dev/cefifrom
andrew-c-ross:feature/o2-budget-diagnostics
Aug 22, 2024
Merged

Add generic tracer budget diagnostics#12
yichengt900 merged 12 commits into
NOAA-CEFI-Regional-Ocean-Modeling:dev/cefifrom
andrew-c-ross:feature/o2-budget-diagnostics

Conversation

@andrew-c-ross
Copy link
Copy Markdown

Work in progress: adds code for generic tracer budget diagnostics developed by Enhui Lao, Fan Yang, and Mathieu Poupon. This code has been used in the past and confirmed to close for oxygen, but I need to re-check this re-merged version. This also needs to be paired with a change to MOM6 to get all of the diagnostics (I believe one won't break the other, however).

# Conflicts:
#	src/tracer/MOM_generic_tracer.F90
#	src/tracer/MOM_tracer_registry.F90
@andrew-c-ross andrew-c-ross force-pushed the feature/o2-budget-diagnostics branch from ee4ca43 to 9bbafb0 Compare August 6, 2024 20:52
@andrew-c-ross andrew-c-ross force-pushed the feature/o2-budget-diagnostics branch from 9bbafb0 to ef29b12 Compare August 6, 2024 20:56
@andrew-c-ross andrew-c-ross marked this pull request as ready for review August 6, 2024 21:49
Comment thread src/tracer/MOM_generic_tracer.F90 Outdated
Copy link
Copy Markdown

@yichengt900 yichengt900 left a comment

Choose a reason for hiding this comment

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

Thank you for opening this PR. The changes look good to me. Since this PR introduces a new dependency array, boundary_forcing_tend, which is initialized in generic_tracer_utils.F90:
https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/3c965b777c7b5b9f5620d712658527c302269bbe/generic_tracers/generic_tracer_utils.F90#L1075
This causes this PR to be unable to stand alone. I'll wait until the ocean_BGC PR is merged.

Comment thread src/tracer/MOM_tracer_registry.F90 Outdated
trim(lowercase(flux_longname)), conv_units, v_extensive=.true., &
conversion=Tr%conv_scale*US%s_to_T)
Tr%id_difc_xy = register_diag_field('ocean_model',trim(shortnm)//"_diffusionc_xy", &
diag%axesTL, Time, "Horizontal convergence of residual mean diffusive fluxes of "//trim(shortnm), &
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@andrew-c-ross, I thought diffusionc_xy was for concentration and diffusion_xy was for content? Do you think it would be good to update the descriptions here, as well as on line 462, to reflect the difference?

Copy link
Copy Markdown
Author

@andrew-c-ross andrew-c-ross Aug 22, 2024

Choose a reason for hiding this comment

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

Thanks, I forgot to check the units and descriptions for the diagnostics on the MOM6 side. I think it should be okay now---I added "concentration" to the description of the c diagnostics and made it so the units for _diffusion_xy come out as mol/kg m s-1, the same as _advection_xy.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

For example:

"sio4_diffusionc_xy"  [Unused]
    ! modules: {ocean_model,ocean_model_z,ocean_model_rho2,ocean_model_d2,ocean_model_z_d2,ocean_model_rho2_d2}
    ! long_name: Horizontal convergence of residual mean diffusive fluxes of sio4 concentration
    ! units: mol/kg s-1
    ! cell_methods: xh:mean yh:mean zl:mean area:mean
    ! variants: {sio4_diffusionc_xy,sio4_diffusionc_xy_xyave}
"sio4_diffusion_xy"  [Unused]
    ! modules: {ocean_model,ocean_model_z,ocean_model_rho2,ocean_model_d2,ocean_model_z_d2,ocean_model_rho2_d2}
    ! long_name: Horizontal convergence of residual mean diffusive fluxes of sio4
    ! units: mol/kg m s-1
    ! cell_methods: xh:mean yh:mean zl:mean area:mean
    ! variants: {sio4_diffusion_xy,sio4_diffusion_xy_xyave}

Copy link
Copy Markdown

@yichengt900 yichengt900 left a comment

Choose a reason for hiding this comment

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

@andrew-c-ross, the code changes look excellent now—approved! I am currently updating our model configurations to accommodate @theresa-morrison’s new MLD interface, so I will likely merge this PR once I finish that.

@yichengt900 yichengt900 merged commit 57968dd into NOAA-CEFI-Regional-Ocean-Modeling:dev/cefi Aug 22, 2024
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