Skip to content

Conversation

@hra063
Copy link

@hra063 hra063 commented Nov 14, 2025

Added the Source modifications needed to run the SST pacemaker experiments

This configuration enables running SST pacemaker experiments with NorESM2. The SST pacemaker configuration allows Sea surface temperature (SST) to be prescribed over selected regions while maintaining interactive coupling elsewhere. The pacemaker region is currently set for the Kuroshio region; can be modified by updating the mask file. The SST data used here is from the coupled MX run of NorESM2 (0.125° ocean and 1° atmosphere).

This work was done under my PhD project, supervised by Camille Li, Aleksi Nummelin, and Ingo Bethke.

@jmaerz
Copy link
Contributor

jmaerz commented Nov 14, 2025

Just as a brief comment: since the BLOM code development has moved/is moving fast, it would be at least good to refer to a certain git-sha (and/or tag) in the README.md for which this code is suitable (both, BLOM and NorESM tags/shas).

@gold2718
Copy link

@jmaerz, note that this PR is going into the noresm2 branch since these experiments were done on the NorESM2.0 code base. These modifications will be merged and tagged there for publication purposes.

Copy link
Contributor

@TomasTorsvik TomasTorsvik left a comment

Choose a reason for hiding this comment

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

I suppose this should be OK. Do we require any testing or proof of concept for things that go in SourceMods? Maybe not critical, since I don't think we will have many such updates on the NorESM2 source code.

@mvertens mvertens changed the title Added the Source modifications needed to run the SST pacemaker experiments Noresm2: Added the Source modifications needed to run the SST pacemaker experiments Nov 28, 2025
@gold2718 gold2718 changed the title Noresm2: Added the Source modifications needed to run the SST pacemaker experiments release-noresm2.0.1: Added the Source modifications needed to run the SST pacemaker experiments Dec 11, 2025
@gold2718 gold2718 changed the title release-noresm2.0.1: Added the Source modifications needed to run the SST pacemaker experiments release-noresm2.0.11: Added the Source modifications needed to run the SST pacemaker experiments Dec 11, 2025
@gold2718 gold2718 changed the title release-noresm2.0.11: Added the Source modifications needed to run the SST pacemaker experiments release-noresm2.0.11: Modifications to run the SST pacemaker experiments Dec 11, 2025
@gold2718 gold2718 changed the title release-noresm2.0.11: Modifications to run the SST pacemaker experiments release-noresm2.0.11: Capability to run the SST pacemaker experiments Dec 11, 2025
@gold2718
Copy link

@TomasTorsvik,

While we tried to make this experiment work using only SourceMods, we require two new namelist variables to specify the paths to the input files (SST and associated mask) so they can be added to the input data list. However, BLOM does not look for a SourceMods version of namelist_definition_blom.xml so I think we need to make a modification of BLOM.

I have some approaches in mind:

  1. Add the two variable to namelist_definition_blom.xml and make a new BLOM tag (v1.4.5?). This is very straightforward but these two variables are only recognized with Hari's pacemaker SourceMods. This is low risk but if anyone adds either of these variables to their user_nl_blom without using the pacemaker SourceMods, the model will crash at run time with a namelist read error.
  2. Add a check in cime_config/buildnml to substitute a SourceMods version of namelist_definition_blom.xml if it exists. This is also straightforward and would also allow future experiments of this type (and could be added to the new version of BLOM if you want). It also gives everyone the pleasure of seeing Mr. anti-SourceMods adding more SourceMods capability 🤯
  3. Just add the experiment as a new option in BLOM and tag that. This is a bit more work but is a viable option.

Are any of these acceptable? Do you have a preference or a different suggestion?

@TomasTorsvik
Copy link
Contributor

@gold2718 - I think I would go for option (1) in this case, as I am also not a fan of adding support for SourceMods. I think it is not very likely that we will have a large number of future experiments with NorESM2 that need SourceMods, so maybe just treat this as an exceptional case. We should make a warning in the log and comments that these variables require the specific pacemaker SourceMods.

Copy link

@gold2718 gold2718 left a comment

Choose a reason for hiding this comment

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

I do not understand why some files are in src.drv and not in src.blom.
Can you explain why they need to be there and how it works? I thought BLOM only looked for src.blom when compiling SourceMods.

Choose a reason for hiding this comment

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

This is a BLOM file, why is it in src.drv instead of src.blom? Is it even being compiled by BLOM?

Choose a reason for hiding this comment

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

This is a BLOM file, why is it in src.drv instead of src.blom? Is it even being compiled by BLOM?

Copy link
Author

@hra063 hra063 Dec 11, 2025

Choose a reason for hiding this comment

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

These are the files under drivers in BLOM: noresm/components/blom/drivers/cpl_mct/. I am actually not modifying anything in BLOM (I think), but I am overriding the BLOM SST passed on to the coupler with the pacemaker SST over the pacemaker region.

Choose a reason for hiding this comment

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

This code is part of the BLOM cap (code that connects NorESM with BLOM internals). This code is compiled as part of BLOM, are you sure your changes are compiled into BLOM?

I do see BLOM changes to geoenv_file.F and mod_grid.F90. I am curious as to whether or not the changes to ocn_comp_mct.F90 and sumsbuff_mct.F are compiled as part of your experiment. Do you have a build log available?

Copy link

@camille-li camille-li Dec 18, 2025

Choose a reason for hiding this comment

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

We had a chat with Aleksi and Ingo to clarify what we think we're doing. So it's true that we're not actually modifying anything in BLOM. We're just over-riding the BLOM SSTs in a specific region (the Kuroshio in our case) with other SSTs before this gets passed to the coupler. Does this help?

Screenshot 2025-12-18 at 16 02 55

Choose a reason for hiding this comment

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

My point is that BLOM will build in the files in <NorESM2>/cime_config/usermods_dirs/n1850_SST_pacemaker_Kuroshio/SourceMods/src.blom but not the files in <NorESM2>/cime_config/usermods_dirs/n1850_SST_pacemaker_Kuroshio/SourceMods/src.drv.

Thus, I think you are getting the original ocn_comp_mct.F90 from <NorESM2>/components/blom/drivers/mct/ocn_comp_mct.F90

You will get the modified files from src.blom (geoenv_file.F and mod_grid.F90).

geoenv_file.F seems to be reading the pacemaker mask (diff the source mod with the version in blom/phy).

Is there a case directory run with this code base I can look at? I do not see how the SST file is even getting read in this version.


Location of the file:

/cluster/work/users/hra063/So_t/pacemaker_mask.nc

Choose a reason for hiding this comment

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

This should be updated to point to its inputdata location.

gold2718 added a commit to NorESMhub/BLOM that referenced this pull request Dec 12, 2025
Added entries for Kuroshio Current SST pacemaker experiments

In order to run SST experiments in the Kurosio Current region, two input files are required. See NorESMhub/NorESM#737 for details. This PR adds namelist entries for these two files.

No tests run, however, namelist_definition_blom.xml validated against schema, cime_config/ParamGen/xml_schema/entry_id_pg.xsd
Copy link

@gold2718 gold2718 left a comment

Choose a reason for hiding this comment

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

Oops, I just realized my comments were not getting published to this page.

Choose a reason for hiding this comment

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

This code is part of the BLOM cap (code that connects NorESM with BLOM internals). This code is compiled as part of BLOM, are you sure your changes are compiled into BLOM?

I do see BLOM changes to geoenv_file.F and mod_grid.F90. I am curious as to whether or not the changes to ocn_comp_mct.F90 and sumsbuff_mct.F are compiled as part of your experiment. Do you have a build log available?

Choose a reason for hiding this comment

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

My point is that BLOM will build in the files in <NorESM2>/cime_config/usermods_dirs/n1850_SST_pacemaker_Kuroshio/SourceMods/src.blom but not the files in <NorESM2>/cime_config/usermods_dirs/n1850_SST_pacemaker_Kuroshio/SourceMods/src.drv.

Thus, I think you are getting the original ocn_comp_mct.F90 from <NorESM2>/components/blom/drivers/mct/ocn_comp_mct.F90

You will get the modified files from src.blom (geoenv_file.F and mod_grid.F90).

geoenv_file.F seems to be reading the pacemaker mask (diff the source mod with the version in blom/phy).

Is there a case directory run with this code base I can look at? I do not see how the SST file is even getting read in this version.

@IngoBethke
Copy link
Contributor

The results of Hari's analysis of the simulation output clearly suggest that the SSTs are applied. I can confirm, however, that BLOM's build script only looks for source code in SourceMods/src.blom.

@gold2718 Could it be that the ocn_comp_mct.F90 module from SourceMods/src.drv is compiled during the driver compilation and then skipped during BLOM compilation? This could be the case if all components are compiled in the same directory (though it is not clear that the driver compilation would pick up ocn_comp_mct.F90 if it does not use any of its contents).

Another explanation could be that @hra063 directly modified components/blom/drivers/cpl_mct/ocn_comp_mct.F90 without going through SourceMods in his work.

@hra063 Could you could point us to a relevant case directory and buildlog-files?

@gold2718
Copy link

@IngoBethke

The results of Hari's analysis of the simulation output clearly suggest that the SSTs are applied

I certainly believe this, however, my understanding is that the experiments were done on a different branch and the experiment modifications were copied to SourceMods in this branch after the fact (at my suggestion so we could get to this PR).

My first question is: Were the experiments done with the same SourceMods format (i.e., using src.drv)?

Could it be that the ocn_comp_mct.F90 module from SourceMods/src.drv is compiled during the driver compilation and then skipped during BLOM compilation?

I created a case and see no evidence that the driver is building these files. Unfortunately, I did not get all the way through the build because of a compile error in BLOM. The mod_grid.F90 in SourceMods/src.blom is missing variables that are in the v1.4.4 version of phy/mod_grid.F90. These variables are used by geoenv_test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

6 participants