Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve conflicts between ODA use framework #1291 and dev/gfdl #12

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
dc74767
Adds targets check_mom6_api_nuopc, check_mom6_api_coupled
adcroft Jan 12, 2021
5c93def
MOM_hor_visc: horizontal_viscosity loop reorder
marshallward Jan 12, 2021
571013d
+Added MOM_coms_wrapper.F90
Hallberg-NOAA Jan 12, 2021
1417dce
+Added MOM_interpolate.F90
Hallberg-NOAA Jan 13, 2021
906bdc4
Merge branch 'revise_framework' into revise_framework_more
Hallberg-NOAA Jan 13, 2021
d610712
Merge branch 'revise_framework' into revise_framework_more
Hallberg-NOAA Jan 13, 2021
43ae9ae
Adds --with-driver option to configure
adcroft Jan 13, 2021
76cb471
Cleaned up MOM_horizontal_regridding
Hallberg-NOAA Jan 13, 2021
9dabf3f
Merge branch 'dev/gfdl' into revise_framework_more
Hallberg-NOAA Jan 14, 2021
7114d63
Merge branch 'dev/gfdl' into hor_visc_2x
Hallberg-NOAA Jan 14, 2021
e4d984a
+Created MOM_diag_manager to wrap diag_manager
Hallberg-NOAA Jan 14, 2021
76b3ccc
Use only for netcdf in MOM_horizontal_regridding
Hallberg-NOAA Jan 14, 2021
e29a12b
Adds a GH workflow to check driver APIs
adcroft Jan 15, 2021
eb0c03a
Avoid unnecessary steps in actions/testing_setup
adcroft Jan 15, 2021
354d6d6
MOM_hor_visc: Revert tension/shear loop fusion
marshallward Jan 18, 2021
d4fe16e
Merge branch 'dev/gfdl' into nuopc-api-test
adcroft Jan 19, 2021
be5fb70
Merge pull request #1287 from marshallward/hor_visc_2x
Hallberg-NOAA Jan 19, 2021
2157311
Merge branch 'dev/gfdl' into revise_framework_more
Hallberg-NOAA Jan 19, 2021
49c7fdd
Merge branch 'dev/gfdl' into nuopc-api-test
Hallberg-NOAA Jan 19, 2021
da8e4cb
Merge pull request #1292 from adcroft/nuopc-api-test
Hallberg-NOAA Jan 19, 2021
fcae4b9
Merge branch 'dev/gfdl' into revise_framework_more
Hallberg-NOAA Jan 19, 2021
b90ad5c
Merge pull request #1289 from Hallberg-NOAA/revise_framework_more
adcroft Jan 19, 2021
4d839aa
Merge branch 'oda_use_framework' of https://github.com/MJHarrison-GFD…
Hallberg-NOAA Jan 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/actions/testing-setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
name: 'Build-.testing-prerequisites'
description: 'Build pre-requisites for .testing including FMS and a symmetric MOM6 executable'
inputs:
build_symmetric:
description: 'If true, will build the symmetric MOM6 executable'
required: false
default: 'true'
install_python:
description: 'If true, will install the local python env needed for .testing'
required: false
default: 'true'
runs:
using: 'composite'
steps:
Expand Down Expand Up @@ -51,15 +60,15 @@ runs:
run: |
echo "::group::Compile MOM6 in symmetric memory mode"
cd .testing
make build/symmetric/MOM6 -j
test ${{ inputs.build_symmetric }} == true && make build/symmetric/MOM6 -j
echo "::endgroup::"

- name: Install local python venv for generating input data
shell: bash
run: |
echo "::group::Create local python env for input data generation"
cd .testing
make work/local-env
test ${{ inputs.install_python }} == true && make work/local-env
echo "::endgroup::"

- name: Set flags
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/coupled-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: API for coupled drivers

on: [push, pull_request]

jobs:
test-top-api:

runs-on: ubuntu-latest
defaults:
run:
working-directory: .testing

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: ./.github/actions/testing-setup
with:
build_symmetric: 'false'
install_python: 'false'

- name: Compile MOM6 for the GFDL coupled driver
shell: bash
run: make check_mom6_api_coupled -j

- name: Compile MOM6 for the NUOPC driver
shell: bash
run: make check_mom6_api_nuopc -j

- name: Compile MOM6 for the MCT driver
shell: bash
run: make check_mom6_api_mct -j
27 changes: 25 additions & 2 deletions .testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,19 @@ build/asymmetric/Makefile: MOM_ENV=$(PATH_FMS) $(ASYMMETRIC_FCFLAGS) $(MOM_LDFLA
build/repro/Makefile: MOM_ENV=$(PATH_FMS) $(REPRO_FCFLAGS) $(MOM_LDFLAGS)
build/openmp/Makefile: MOM_ENV=$(PATH_FMS) $(OPENMP_FCFLAGS) $(MOM_LDFLAGS)
build/target/Makefile: MOM_ENV=$(PATH_FMS) $(TARGET_FCFLAGS) $(MOM_LDFLAGS)

build/coupled/Makefile: MOM_ENV=$(PATH_FMS) $(SYMMETRIC_FCFLAGS) $(SYMMETRIC_LDFLAGS)
build/nuopc/Makefile: MOM_ENV=$(PATH_FMS) $(SYMMETRIC_FCFLAGS) $(SYMMETRIC_LDFLAGS)
build/mct/Makefile: MOM_ENV=$(PATH_FMS) $(SYMMETRIC_FCFLAGS) $(SYMMETRIC_LDFLAGS)

# Configure script flags
build/symmetric/Makefile: MOM_ACFLAGS=
build/asymmetric/Makefile: MOM_ACFLAGS=--enable-asymmetric
build/repro/Makefile: MOM_ACFLAGS=
build/openmp/Makefile: MOM_ACFLAGS=--enable-openmp
build/target/Makefile: MOM_ACFLAGS=

build/coupled/Makefile: MOM_ACFLAGS=--with-driver=coupled_driver
build/nuopc/Makefile: MOM_ACFLAGS=--with-driver=nuopc_driver
build/mct/Makefile: MOM_ACFLAGS=--with-driver=mct_driver

# Fetch regression target source code
build/target/Makefile: | $(TARGET_CODEBASE)
Expand Down Expand Up @@ -328,6 +332,25 @@ $(DEPS)/Makefile: ../ac/deps/Makefile
mkdir -p $(@D)
cp $< $@

#---
# The following block does a non-library build of a coupled driver interface to MOM, along with everything below it.
# This simply checks that we have not broken the ability to compile. This is not a means to build a complete coupled executable.
# Todo:
# - avoid re-building FMS and MOM6 src by re-using existing object/mod files
# - use autoconf rather than mkmf templates
MK_TEMPLATE ?= ../../$(DEPS)/mkmf/templates/ncrc-gnu.mk
# NUOPC driver
build/nuopc/mom_ocean_model_nuopc.o: build/nuopc/Makefile
cd $(@D) && make $(@F)
check_mom6_api_nuopc: build/nuopc/mom_ocean_model_nuopc.o
# GFDL coupled driver
build/coupled/ocean_model_MOM.o: build/coupled/Makefile
cd $(@D) && make $(@F)
check_mom6_api_coupled: build/coupled/ocean_model_MOM.o
# MCT driver
build/mct/mom_ocean_model_mct.o: build/mct/Makefile
cd $(@D) && make $(@F)
check_mom6_api_mct: build/mct/mom_ocean_model_mct.o

#---
# Python preprocessing
Expand Down
10 changes: 8 additions & 2 deletions ac/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ AC_ARG_ENABLE([asymmetric],
AS_IF([test "$enable_asymmetric" = yes],
[MEM_LAYOUT=${srcdir}/config_src/dynamic])

# Default to solo_driver
DRIVER_DIR=${srcdir}/config_src/solo_driver
AC_ARG_WITH([driver],
AS_HELP_STRING([--with-driver=coupled_driver|solo_driver], [Select directory for driver source code]))
AS_IF([test "x$with_driver" != "x"],
[DRIVER_DIR=${srcdir}/config_src/${with_driver}])

# TODO: Rather than point to a pre-configured header file, autoconf could be
# used to configure a header based on a template.
Expand Down Expand Up @@ -210,10 +216,10 @@ AS_IF([test -z "$MKMF"], [
AC_CONFIG_COMMANDS([path_names],
[list_paths -l \
${srcdir}/src \
${srcdir}/config_src/solo_driver \
${srcdir}/config_src/ext* \
${DRIVER_DIR} \
${MEM_LAYOUT}
], [MEM_LAYOUT=$MEM_LAYOUT])
], [MEM_LAYOUT=$MEM_LAYOUT DRIVER_DIR=$DRIVER_DIR])


AC_CONFIG_COMMANDS([Makefile.mkmf],
Expand Down
49 changes: 24 additions & 25 deletions config_src/coupled_driver/MOM_surface_forcing_gfdl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module MOM_surface_forcing_gfdl
!#CTRL# use MOM_controlled_forcing, only : apply_ctrl_forcing, register_ctrl_forcing_restarts
!#CTRL# use MOM_controlled_forcing, only : controlled_forcing_init, controlled_forcing_end
!#CTRL# use MOM_controlled_forcing, only : ctrl_forcing_CS
use MOM_coms, only : reproducing_sum
use MOM_coms, only : reproducing_sum, field_chksum
use MOM_constants, only : hlv, hlf
use MOM_cpu_clock, only : cpu_clock_id, cpu_clock_begin, cpu_clock_end
use MOM_cpu_clock, only : CLOCK_SUBCOMPONENT
Expand All @@ -21,6 +21,8 @@ module MOM_surface_forcing_gfdl
use MOM_forcing_type, only : allocate_mech_forcing, deallocate_mech_forcing
use MOM_get_input, only : Get_MOM_Input, directories
use MOM_grid, only : ocean_grid_type
use MOM_interpolate, only : init_external_field, time_interp_extern
use MOM_interpolate, only : time_interp_external_init
use MOM_io, only : slasher, write_version_number, MOM_read_data
use MOM_restart, only : register_restart_field, restart_init, MOM_restart_CS
use MOM_restart, only : restart_init_end, save_restart, restore_state
Expand All @@ -36,9 +38,6 @@ module MOM_surface_forcing_gfdl
use coupler_types_mod, only : coupler_type_copy_data
use data_override_mod, only : data_override_init, data_override
use fms_mod, only : stdout
use mpp_mod, only : mpp_chksum
use time_interp_external_mod, only : init_external_field, time_interp_external
use time_interp_external_mod, only : time_interp_external_init

implicit none ; private

Expand Down Expand Up @@ -350,7 +349,7 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,

! Salinity restoring logic
if (CS%restore_salt) then
call time_interp_external(CS%id_srestore,Time,data_restore)
call time_interp_extern(CS%id_srestore, Time, data_restore)
! open_ocn_mask indicates where to restore salinity (1 means restore, 0 does not)
open_ocn_mask(:,:) = 1.0
if (CS%mask_srestore_under_ice) then ! Do not restore under sea-ice
Expand Down Expand Up @@ -407,7 +406,7 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,

! SST restoring logic
if (CS%restore_temp) then
call time_interp_external(CS%id_trestore,Time,data_restore)
call time_interp_extern(CS%id_trestore, Time, data_restore)
do j=js,je ; do i=is,ie
delta_sst = data_restore(i,j)- sfc_state%SST(i,j)
delta_sst = sign(1.0,delta_sst)*min(abs(delta_sst),CS%max_delta_trestore)
Expand Down Expand Up @@ -1486,7 +1485,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, wind_stagger)
enddo ; enddo
endif

call time_interp_external_init
call time_interp_external_init()

! Optionally read a x-y gustiness field in place of a global constant.
call get_param(param_file, mdl, "READ_GUST_2D", CS%read_gust_2d, &
Expand Down Expand Up @@ -1632,27 +1631,27 @@ subroutine ice_ocn_bnd_type_chksum(id, timestep, iobt)
outunit = stdout()

write(outunit,*) "BEGIN CHECKSUM(ice_ocean_boundary_type):: ", id, timestep
write(outunit,100) 'iobt%u_flux ', mpp_chksum( iobt%u_flux )
write(outunit,100) 'iobt%v_flux ', mpp_chksum( iobt%v_flux )
write(outunit,100) 'iobt%t_flux ', mpp_chksum( iobt%t_flux )
write(outunit,100) 'iobt%q_flux ', mpp_chksum( iobt%q_flux )
write(outunit,100) 'iobt%salt_flux ', mpp_chksum( iobt%salt_flux )
write(outunit,100) 'iobt%lw_flux ', mpp_chksum( iobt%lw_flux )
write(outunit,100) 'iobt%sw_flux_vis_dir', mpp_chksum( iobt%sw_flux_vis_dir)
write(outunit,100) 'iobt%sw_flux_vis_dif', mpp_chksum( iobt%sw_flux_vis_dif)
write(outunit,100) 'iobt%sw_flux_nir_dir', mpp_chksum( iobt%sw_flux_nir_dir)
write(outunit,100) 'iobt%sw_flux_nir_dif', mpp_chksum( iobt%sw_flux_nir_dif)
write(outunit,100) 'iobt%lprec ', mpp_chksum( iobt%lprec )
write(outunit,100) 'iobt%fprec ', mpp_chksum( iobt%fprec )
write(outunit,100) 'iobt%runoff ', mpp_chksum( iobt%runoff )
write(outunit,100) 'iobt%calving ', mpp_chksum( iobt%calving )
write(outunit,100) 'iobt%p ', mpp_chksum( iobt%p )
write(outunit,100) 'iobt%u_flux ', field_chksum( iobt%u_flux )
write(outunit,100) 'iobt%v_flux ', field_chksum( iobt%v_flux )
write(outunit,100) 'iobt%t_flux ', field_chksum( iobt%t_flux )
write(outunit,100) 'iobt%q_flux ', field_chksum( iobt%q_flux )
write(outunit,100) 'iobt%salt_flux ', field_chksum( iobt%salt_flux )
write(outunit,100) 'iobt%lw_flux ', field_chksum( iobt%lw_flux )
write(outunit,100) 'iobt%sw_flux_vis_dir', field_chksum( iobt%sw_flux_vis_dir)
write(outunit,100) 'iobt%sw_flux_vis_dif', field_chksum( iobt%sw_flux_vis_dif)
write(outunit,100) 'iobt%sw_flux_nir_dir', field_chksum( iobt%sw_flux_nir_dir)
write(outunit,100) 'iobt%sw_flux_nir_dif', field_chksum( iobt%sw_flux_nir_dif)
write(outunit,100) 'iobt%lprec ', field_chksum( iobt%lprec )
write(outunit,100) 'iobt%fprec ', field_chksum( iobt%fprec )
write(outunit,100) 'iobt%runoff ', field_chksum( iobt%runoff )
write(outunit,100) 'iobt%calving ', field_chksum( iobt%calving )
write(outunit,100) 'iobt%p ', field_chksum( iobt%p )
if (associated(iobt%ustar_berg)) &
write(outunit,100) 'iobt%ustar_berg ', mpp_chksum( iobt%ustar_berg )
write(outunit,100) 'iobt%ustar_berg ', field_chksum( iobt%ustar_berg )
if (associated(iobt%area_berg)) &
write(outunit,100) 'iobt%area_berg ', mpp_chksum( iobt%area_berg )
write(outunit,100) 'iobt%area_berg ', field_chksum( iobt%area_berg )
if (associated(iobt%mass_berg)) &
write(outunit,100) 'iobt%mass_berg ', mpp_chksum( iobt%mass_berg )
write(outunit,100) 'iobt%mass_berg ', field_chksum( iobt%mass_berg )
100 FORMAT(" CHECKSUM::",A20," = ",Z20)

call coupler_type_write_chksums(iobt%fluxes, outunit, 'iobt%')
Expand Down
22 changes: 11 additions & 11 deletions config_src/coupled_driver/ocean_model_MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ module ocean_model_mod
use MOM, only : extract_surface_state, allocate_surface_state, finish_MOM_initialization
use MOM, only : get_MOM_state_elements, MOM_state_is_synchronized
use MOM, only : get_ocean_stocks, step_offline
use MOM_coms, only : field_chksum
use MOM_constants, only : CELSIUS_KELVIN_OFFSET, hlf
use MOM_diag_mediator, only : diag_ctrl, enable_averaging, disable_averaging
use MOM_diag_mediator, only : diag_mediator_close_registration, diag_mediator_end
use MOM_domains, only : pass_var, pass_vector, AGRID, BGRID_NE, CGRID_NE
use MOM_domains, only : TO_ALL, Omit_Corners
use MOM_error_handler, only : MOM_error, MOM_mesg, FATAL, WARNING, is_root_pe
use MOM_error_handler, only : callTree_enter, callTree_leave
use MOM_EOS, only : gsw_sp_from_sr, gsw_pt_from_ct
use MOM_file_parser, only : get_param, log_version, close_param_file, param_file_type
use MOM_forcing_type, only : forcing, mech_forcing, allocate_forcing_type
use MOM_forcing_type, only : fluxes_accumulate, get_net_mass_forcing
Expand All @@ -48,6 +50,8 @@ module ocean_model_mod
use MOM_verticalGrid, only : verticalGrid_type
use MOM_ice_shelf, only : initialize_ice_shelf, shelf_calc_flux, ice_shelf_CS
use MOM_ice_shelf, only : add_shelf_forces, ice_shelf_end, ice_shelf_save_restart
use MOM_wave_interface, only: wave_parameters_CS, MOM_wave_interface_init
use MOM_wave_interface, only: MOM_wave_interface_init_lite, Update_Surface_Waves
use coupler_types_mod, only : coupler_1d_bc_type, coupler_2d_bc_type
use coupler_types_mod, only : coupler_type_spawn, coupler_type_write_chksums
use coupler_types_mod, only : coupler_type_initialized, coupler_type_copy_data
Expand All @@ -56,10 +60,6 @@ module ocean_model_mod
use mpp_domains_mod, only : mpp_define_domains, mpp_get_compute_domain, mpp_get_data_domain
use atmos_ocean_fluxes_mod, only : aof_set_coupler_flux
use fms_mod, only : stdout
use mpp_mod, only : mpp_chksum
use MOM_EOS, only : gsw_sp_from_sr, gsw_pt_from_ct
use MOM_wave_interface, only: wave_parameters_CS, MOM_wave_interface_init
use MOM_wave_interface, only: MOM_wave_interface_init_lite, Update_Surface_Waves

#include <MOM_memory.h>

Expand Down Expand Up @@ -1130,13 +1130,13 @@ subroutine ocean_public_type_chksum(id, timestep, ocn)
outunit = stdout()

write(outunit,*) "BEGIN CHECKSUM(ocean_type):: ", id, timestep
write(outunit,100) 'ocean%t_surf ',mpp_chksum(ocn%t_surf )
write(outunit,100) 'ocean%s_surf ',mpp_chksum(ocn%s_surf )
write(outunit,100) 'ocean%u_surf ',mpp_chksum(ocn%u_surf )
write(outunit,100) 'ocean%v_surf ',mpp_chksum(ocn%v_surf )
write(outunit,100) 'ocean%sea_lev ',mpp_chksum(ocn%sea_lev)
write(outunit,100) 'ocean%frazil ',mpp_chksum(ocn%frazil )
write(outunit,100) 'ocean%melt_potential ',mpp_chksum(ocn%melt_potential)
write(outunit,100) 'ocean%t_surf ', field_chksum(ocn%t_surf )
write(outunit,100) 'ocean%s_surf ', field_chksum(ocn%s_surf )
write(outunit,100) 'ocean%u_surf ', field_chksum(ocn%u_surf )
write(outunit,100) 'ocean%v_surf ', field_chksum(ocn%v_surf )
write(outunit,100) 'ocean%sea_lev ', field_chksum(ocn%sea_lev)
write(outunit,100) 'ocean%frazil ', field_chksum(ocn%frazil )
write(outunit,100) 'ocean%melt_potential ', field_chksum(ocn%melt_potential)
call coupler_type_write_chksums(ocn%fields, outunit, 'ocean%')
100 FORMAT(" CHECKSUM::",A20," = ",Z20)

Expand Down
14 changes: 7 additions & 7 deletions config_src/solo_driver/MOM_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ program MOM_main
use MOM, only : extract_surface_state, finish_MOM_initialization
use MOM, only : get_MOM_state_elements, MOM_state_is_synchronized
use MOM, only : step_offline
use MOM_coms, only : Set_PElist
use MOM_domains, only : MOM_infra_init, MOM_infra_end
use MOM_error_handler, only : MOM_error, MOM_mesg, WARNING, FATAL, is_root_pe
use MOM_error_handler, only : callTree_enter, callTree_leave, callTree_waypoint
Expand All @@ -41,6 +42,7 @@ program MOM_main
use MOM_forcing_type, only : mech_forcing_diags, MOM_forcing_chksum, MOM_mech_forcing_chksum
use MOM_get_input, only : directories
use MOM_grid, only : ocean_grid_type
use MOM_interpolate, only : time_interp_external_init
use MOM_io, only : file_exists, open_file, close_file
use MOM_io, only : check_nml_error, io_infra_init, io_infra_end
use MOM_io, only : APPEND_FILE, ASCII_FILE, READONLY_FILE, SINGLE_FILE
Expand All @@ -64,8 +66,6 @@ program MOM_main
use MOM_get_input, only : get_MOM_input
use ensemble_manager_mod, only : ensemble_manager_init, get_ensemble_size
use ensemble_manager_mod, only : ensemble_pelist_setup
use mpp_mod, only : set_current_pelist => mpp_set_current_pelist
use time_interp_external_mod, only : time_interp_external_init
use fms_affinity_mod, only : fms_affinity_init, fms_affinity_set,fms_affinity_get

use MOM_ice_shelf, only : initialize_ice_shelf, ice_shelf_end, ice_shelf_CS
Expand Down Expand Up @@ -229,7 +229,7 @@ program MOM_main
allocate(ocean_pelist(nPEs_per))
call ensemble_pelist_setup(.true., 0, nPEs_per, 0, 0, atm_pelist, ocean_pelist, &
land_pelist, ice_pelist)
call set_current_pelist(ocean_pelist)
call Set_PElist(ocean_pelist)
deallocate(ocean_pelist)
endif

Expand Down Expand Up @@ -286,17 +286,17 @@ program MOM_main


if (sum(date_init) > 0) then
Start_time = set_date(date_init(1),date_init(2), date_init(3), &
date_init(4),date_init(5),date_init(6))
Start_time = set_date(date_init(1), date_init(2), date_init(3), &
date_init(4), date_init(5), date_init(6))
else
Start_time = real_to_time(0.0)
endif

call time_interp_external_init
call time_interp_external_init()

if (sum(date) >= 0) then
! In this case, the segment starts at a time fixed by ocean_solo.res
segment_start_time = set_date(date(1),date(2),date(3),date(4),date(5),date(6))
segment_start_time = set_date(date(1), date(2), date(3), date(4), date(5), date(6))
Time = segment_start_time
else
! In this case, the segment starts at a time read from the MOM restart file
Expand Down
9 changes: 4 additions & 5 deletions src/core/MOM_open_boundary.F90
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ module MOM_open_boundary
use MOM_tidal_forcing, only : astro_longitudes, astro_longitudes_init, eq_phase, nodal_fu, tidal_frequency
use MOM_time_manager, only : set_date, time_type, time_type_to_real, operator(-)
use MOM_tracer_registry, only : tracer_type, tracer_registry_type, tracer_name_lookup
use time_interp_external_mod, only : init_external_field, time_interp_external
use time_interp_external_mod, only : time_interp_external_init
use MOM_interpolate, only : init_external_field, time_interp_extern, time_interp_external_init
use MOM_remapping, only : remappingSchemesDoc, remappingDefaultScheme, remapping_CS
use MOM_remapping, only : initialize_remapping, remapping_core_h, end_remapping
use MOM_regridding, only : regridding_CS
Expand Down Expand Up @@ -3897,7 +3896,7 @@ subroutine update_OBC_segment_data(G, GV, US, OBC, tv, h, Time)

! TODO: Since we conditionally rotate a subset of tmp_buffer_in after
! reading the value, it is currently not possible to use the rotated
! implementation of time_interp_external.
! implementation of time_interp_extern.
! For now, we must explicitly allocate and rotate this array.
if (turns /= 0) then
if (modulo(turns, 2) /= 0) then
Expand All @@ -3909,7 +3908,7 @@ subroutine update_OBC_segment_data(G, GV, US, OBC, tv, h, Time)
tmp_buffer_in => tmp_buffer
endif

call time_interp_external(segment%field(m)%fid,Time, tmp_buffer_in)
call time_interp_extern(segment%field(m)%fid,Time, tmp_buffer_in)
! NOTE: Rotation of face-points require that we skip the final value
if (turns /= 0) then
! TODO: This is hardcoded for 90 degrees, and needs to be generalized.
Expand Down Expand Up @@ -3976,7 +3975,7 @@ subroutine update_OBC_segment_data(G, GV, US, OBC, tv, h, Time)
! no dz for tidal variables
if (segment%field(m)%nk_src > 1 .and.&
(index(segment%field(m)%name, 'phase') .le. 0 .and. index(segment%field(m)%name, 'amp') .le. 0)) then
call time_interp_external(segment%field(m)%fid_dz,Time, tmp_buffer_in)
call time_interp_extern(segment%field(m)%fid_dz,Time, tmp_buffer_in)
if (turns /= 0) then
! TODO: This is hardcoded for 90 degrees, and needs to be generalized.
if (segment%is_E_or_W &
Expand Down
Loading