NOAA-GFDL/MOM6

Error with runoff_added_to_stf flag

Closed this issue · 9 comments

Hi,

I was updating our group's fork of MOM6 this morning. And I'm getting a compiler error from a recent commit:

/MOM6-examples-merge-12162022-2/src/MOM6/src/tracer/MOM_generic_tracer.F90(515): error #6460: This is not a field name that is defined in the encompassing structure. [RUNOFF_ADDED_TO_STF] if (allocated(g_tracer%trunoff) .and. (.NOT. g_tracer%runoff_added_to_stf)) then ------------------------------------------------------------^

I can see that runoff_added_to_stf was added to the g_tracer_type in /config_src/external/GFDL_ocean_BGC/generic_tracer_utils.F90, so I'm not sure what the issue is.

Did anyone else experience this?

Yes, I can confirm this. I did a "git fetch" on ocean_BGC and it didn't update from https://github.com/NOAA-GFDL/ocean_BGC.git (fetch)

I should note that my Makefile builds three executables and the first two built fine: ocean_only, MOM6-SIS2, and MOM6-SIS2-COBALT.

Thanks @kshedstrom, I am indeed trying to compile MOM6-SIS2-COBALT

And MOM6-SIS2 compiles fine for me as well

It sounds like your version of COBALT needs updating with the same change in API. Is this due to #246 ? @andrew-c-ross is the API change already in COBALT ? Adding @nikizadehgfdl to thread. (edited)

Accepting PR #246 into dev/gfdl before github.com/NOAA-GFDL/ocean_BGC/pull/20 had been merged in was a mistake on my part. You should be able to get your code working by revsising the line ~515 of MOM_generic_tracer.F90 from
if (_ALLOCATED(g_tracer%trunoff) .and. (.NOT. g_tracer%runoff_added_to_stf)) then
back to
if (_ALLOCATED(g_tracer%trunoff)) then
and commenting out the line ~523 of the same file with
g_tracer%runoff_added_to_stf = .true..

Thanks everyone! Feel free to close this issue now, or we can leave it open until the ocean_BGC pr is merged

Sorry everyone---I shouldn't have marked the MOM6 PR as ready to review until the ocean_BGC PR was merged.

Now that NOAA-GFDL/ocean_BGC#20 has been merged into ocean_BGC repository, this should no longer be an issue, provided that contemporaneous versions of the MOM6 and ocean_BGC code are used. Accordingly, I am closing this issue.