Skip to content

MARBL OBC Segments w/ Generic Tracers#404

Open
manishvenu wants to merge 14 commits into
NCAR:dev/ncarfrom
CROCODILE-CESM:cleaned_marbl_generic_tracers
Open

MARBL OBC Segments w/ Generic Tracers#404
manishvenu wants to merge 14 commits into
NCAR:dev/ncarfrom
CROCODILE-CESM:cleaned_marbl_generic_tracers

Conversation

@manishvenu
Copy link
Copy Markdown
Collaborator

Description:
Changes required for MARBL regionally & Alper's change so that GLOFAS runoff will work.

Changes:

  1. A function called register_MARBL_tracer_segments that reads the parameter file and registers the correct MOM_open_boundary functions to read from files.
  2. A function called get_marbl_obc_params to read MARBL OBC tracers from the parameter file. Parameters need to be of the form OBC_DATA_{tracer}={filename}({variablename})
  3. Alper's change to noupc cap so GLOFAS works
  4. A change to initialize_marbl_tracers to properly initialize the OBC reservoirs
  5. A change to MOM_tracer_flow_control to call the new register_MARBL_tracer_segments function.

@manishvenu
Copy link
Copy Markdown
Collaborator Author

manishvenu commented Dec 31, 2025

Figured out why it's not bit-for-bit with the previous implementation! The initialize_segment_data runs before the registering of MARBL tracer segments so in the previous implementation initialize_segment_Data included MARBL tracers but the new version doesn't.

You get slightly different results, but both are realistic values. It would be interesting to see if other models use initialize_Segment_data or not.

So not sure if we should fix it or leave it! (Probably should fix it, it's obvious initlaize_sgment_data expects generic tracers) There doesn't seem to be earlier calls to tracer_flow_control, so I'm not sure where we should move the tracers calls, which is why it would be good to see other implementations.

@manishvenu
Copy link
Copy Markdown
Collaborator Author

The push to MOM.F90 is how to make it bit-for-bit

@manishvenu
Copy link
Copy Markdown
Collaborator Author

Looking here, it seems like this implementation doesn't run with initalize_segment_Data either https://github.com/NOAA-GFDL/ocean_BGC/blob/main/generic_tracers/MOM_generic_tracer.F90

@manishvenu manishvenu marked this pull request as ready for review January 15, 2026 22:16
Copy link
Copy Markdown
Collaborator

@mnlevy1981 mnlevy1981 left a comment

Choose a reason for hiding this comment

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

One really minor change, and also one question about the changes in the NUOPC cap... but this looks great

Comment thread config_src/drivers/nuopc_cap/mom_cap.F90
Comment thread src/tracer/MARBL_tracers.F90 Outdated

# include "version_variable.h"

character(len=128), parameter :: sub_name = 'get_marbl_obc_params'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

you don't need 128 characters for this variable; since it's a parameter, you can use

character(len=*), parameter :: sub_name = 'get_marbl_obc_params'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added!

Copy link
Copy Markdown
Collaborator

@mnlevy1981 mnlevy1981 left a comment

Choose a reason for hiding this comment

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

LGTM!

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