diff --git a/MOM6/CMakeLists.txt b/MOM6/CMakeLists.txt index ff501e6..5a87d00 100644 --- a/MOM6/CMakeLists.txt +++ b/MOM6/CMakeLists.txt @@ -62,6 +62,7 @@ target_sources(OM3_mom6 PRIVATE MOM6/src/core/MOM_CoriolisAdv.F90 MOM6/src/core/MOM_density_integrals.F90 MOM6/src/core/MOM_dynamics_split_RK2.F90 + MOM6/src/core/MOM_dynamics_split_RK2b.F90 MOM6/src/core/MOM_dynamics_unsplit.F90 MOM6/src/core/MOM_dynamics_unsplit_RK2.F90 MOM6/src/core/MOM.F90 @@ -80,7 +81,9 @@ target_sources(OM3_mom6 PRIVATE MOM6/src/core/MOM_verticalGrid.F90 MOM6/src/diagnostics/MOM_debugging.F90 + MOM6/src/diagnostics/MOM_diagnose_MLD.F90 MOM6/src/diagnostics/MOM_diagnostics.F90 + MOM6/src/diagnostics/MOM_harmonic_analysis.F90 MOM6/src/diagnostics/MOM_obsolete_diagnostics.F90 MOM6/src/diagnostics/MOM_obsolete_params.F90 MOM6/src/diagnostics/MOM_spatial_means.F90 @@ -97,6 +100,7 @@ target_sources(OM3_mom6 PRIVATE MOM6/src/equation_of_state/MOM_EOS_Wright.F90 MOM6/src/equation_of_state/MOM_EOS_Wright_full.F90 MOM6/src/equation_of_state/MOM_EOS_Wright_red.F90 + MOM6/src/equation_of_state/MOM_EOS_base_type.F90 MOM6/src/equation_of_state/MOM_temperature_convert.F90 MOM6/src/equation_of_state/MOM_TFreeze.F90 @@ -201,7 +205,9 @@ target_sources(OM3_mom6 PRIVATE MOM6/src/parameterizations/lateral/MOM_MEKE.F90 MOM6/src/parameterizations/lateral/MOM_MEKE_types.F90 MOM6/src/parameterizations/lateral/MOM_mixed_layer_restrat.F90 + MOM6/src/parameterizations/lateral/MOM_self_attr_load.F90 MOM6/src/parameterizations/lateral/MOM_spherical_harmonics.F90 + MOM6/src/parameterizations/lateral/MOM_streaming_filter.F90 MOM6/src/parameterizations/lateral/MOM_thickness_diffuse.F90 MOM6/src/parameterizations/lateral/MOM_tidal_forcing.F90 MOM6/src/parameterizations/lateral/MOM_Zanna_Bolton.F90 diff --git a/MOM6/MOM6 b/MOM6/MOM6 index e92c971..776be84 160000 --- a/MOM6/MOM6 +++ b/MOM6/MOM6 @@ -1 +1 @@ -Subproject commit e92c971084e185cfd3902f18072320b45d583a54 +Subproject commit 776be843e904d85c7035ffa00233b962a03bfbb4 diff --git a/MOM6/patches/MOM_PointAccel.F90.patch b/MOM6/patches/MOM_PointAccel.F90.patch index a19ffd6..07195c9 100644 --- a/MOM6/patches/MOM_PointAccel.F90.patch +++ b/MOM6/patches/MOM_PointAccel.F90.patch @@ -1,24 +1,22 @@ ---- ../MOM6/src/diagnostics/MOM_PointAccel.F90 2024-10-23 10:07:22.000000000 +1100 -+++ ../MOM6/src/diagnostics/MOM_PointAccel.F90.new 2024-10-23 10:15:54.000000000 +1100 -@@ -122,8 +122,8 @@ - if (CS%u_file < 0) then +diff --git a/MOM6/src/diagnostics/MOM_PointAccel.F90 b/MOM6/src/diagnostics/MOM_PointAccel.F90.new +index 30f0803..7f91f79 100644 +--- a/MOM6/src/diagnostics/MOM_PointAccel.F90 ++++ b/MOM6/src/diagnostics/MOM_PointAccel.F90.new +@@ -124,7 +124,7 @@ subroutine write_u_accel(I, j, um, hin, ADp, CDp, dt, G, GV, US, CS, vel_rpt, st + if (CS%u_file == -1) then if (len_trim(CS%u_trunc_file) < 1) return call open_ASCII_file(CS%u_file, trim(CS%u_trunc_file), action=APPEND_FILE, & - threading=MULTIPLE, fileset=SINGLE_FILE) -- if (CS%u_file < 0) then + threading=MULTIPLE, fileset=MULTIPLE) -+ if (CS%u_file == -1) then + if (CS%u_file == -1) then call MOM_error(NOTE, 'Unable to open file '//trim(CS%u_trunc_file)//'.') return - endif -@@ -461,8 +461,8 @@ - if (CS%v_file < 0) then +@@ -465,7 +465,7 @@ subroutine write_v_accel(i, J, vm, hin, ADp, CDp, dt, G, GV, US, CS, vel_rpt, st + if (CS%v_file == -1) then if (len_trim(CS%v_trunc_file) < 1) return call open_ASCII_file(CS%v_file, trim(CS%v_trunc_file), action=APPEND_FILE, & - threading=MULTIPLE, fileset=SINGLE_FILE) -- if (CS%v_file < 0) then + threading=MULTIPLE, fileset=MULTIPLE) -+ if (CS%v_file == -1) then + if (CS%v_file == -1) then call MOM_error(NOTE, 'Unable to open file '//trim(CS%v_trunc_file)//'.') return - endif diff --git a/MOM6/patches/MOM_coupler_types.F90.patch b/MOM6/patches/MOM_coupler_types.F90.patch index 25a2759..2f8bfc3 100644 --- a/MOM6/patches/MOM_coupler_types.F90.patch +++ b/MOM6/patches/MOM_coupler_types.F90.patch @@ -1,8 +1,8 @@ diff --git a/MOM6/src/framework/MOM_coupler_types.F90 b/MOM6/src/framework/MOM_coupler_types.F90.new -index f87b409..124d786 100644 +index b931a2d..cac9309 100644 --- a/MOM6/src/framework/MOM_coupler_types.F90 +++ b/MOM6/src/framework/MOM_coupler_types.F90.new -@@ -8,7 +8,10 @@ use MOM_couplertype_infra, only : CT_set_diags, CT_send_data, CT_write_chksums, +@@ -9,7 +9,10 @@ use MOM_couplertype_infra, only : CT_set_diags, CT_send_data, CT_write_chksums, use MOM_couplertype_infra, only : CT_copy_data, CT_increment_data, CT_rescale_data use MOM_couplertype_infra, only : CT_set_data, CT_extract_data, CT_redistribute_data use MOM_couplertype_infra, only : coupler_1d_bc_type, coupler_2d_bc_type, coupler_3d_bc_type @@ -14,7 +14,7 @@ index f87b409..124d786 100644 use MOM_domain_infra, only : domain2D use MOM_time_manager, only : time_type -@@ -22,7 +25,10 @@ public :: atmos_ocn_coupler_flux, coupler_type_data_override +@@ -23,7 +26,10 @@ public :: atmos_ocn_coupler_flux, coupler_type_data_override public :: coupler_1d_bc_type, coupler_2d_bc_type, coupler_3d_bc_type ! These are encoding constant parameters that indicate whether a flux, solubility or ! surface ocean concentration are being set or accessed with an inquiry. diff --git a/MOM6/patches/MOM_forcing_type.F90.patch b/MOM6/patches/MOM_forcing_type.F90.patch index 76bccef..7d5caeb 100644 --- a/MOM6/patches/MOM_forcing_type.F90.patch +++ b/MOM6/patches/MOM_forcing_type.F90.patch @@ -1,8 +1,8 @@ diff --git a/MOM6/src/core/MOM_forcing_type.F90 b/MOM6/src/core/MOM_forcing_type.F90.new -index 200bbd7..fca9187 100644 +index 998713d..a2efcaa 100644 --- a/MOM6/src/core/MOM_forcing_type.F90 +++ b/MOM6/src/core/MOM_forcing_type.F90.new -@@ -2080,6 +2080,11 @@ subroutine fluxes_accumulate(flux_tmp, fluxes, G, wt2, forces) +@@ -2280,6 +2280,11 @@ subroutine fluxes_accumulate(flux_tmp, fluxes, G, wt2, forces) fluxes%salt_flux(i,j) = wt1*fluxes%salt_flux(i,j) + wt2*flux_tmp%salt_flux(i,j) enddo ; enddo diff --git a/MOM6/patches/MOM_generic_tracer.F90.patch b/MOM6/patches/MOM_generic_tracer.F90.patch index 92ffb2d..ddaf55b 100644 --- a/MOM6/patches/MOM_generic_tracer.F90.patch +++ b/MOM6/patches/MOM_generic_tracer.F90.patch @@ -1,5 +1,5 @@ diff --git a/MOM6/src/tracer/MOM_generic_tracer.F90 b/MOM6/src/tracer/MOM_generic_tracer.F90.new -index 131110e..ae75b2e 100644 +index 6b10d15..e092aa7 100644 --- a/MOM6/src/tracer/MOM_generic_tracer.F90 +++ b/MOM6/src/tracer/MOM_generic_tracer.F90.new @@ -21,7 +21,7 @@ module MOM_generic_tracer @@ -11,18 +11,7 @@ index 131110e..ae75b2e 100644 use g_tracer_utils, only: g_tracer_get_name,g_tracer_set_values,g_tracer_set_common,g_tracer_get_common use g_tracer_utils, only: g_tracer_get_next,g_tracer_type,g_tracer_is_prog,g_tracer_flux_init -@@ -352,7 +352,9 @@ contains - enddo ; enddo ; enddo - - !jgj: Reset CASED to 0 below K=1 -- if ( (trim(g_tracer_name) == 'cased') .or. (trim(g_tracer_name) == 'ca13csed') ) then -+ ! dts: also WOMBAT sediment tracers -+ if ( (trim(g_tracer_name) == 'cased') .or. (trim(g_tracer_name) == 'ca13csed') .or. & -+ (trim(g_tracer_name) == 'det_sediment') .or. (trim(g_tracer_name) == 'caco3_sediment')) then - do k=2,nk ; do j=jsc,jec ; do i=isc,iec - if (tr_ptr(i,j,k) /= CS%tracer_land_val) then - tr_ptr(i,j,k) = 0.0 -@@ -507,6 +509,11 @@ contains +@@ -527,6 +527,11 @@ contains ! the fluxes without coming into this subroutine. ! MOM5 has to modified to conform. diff --git a/MOM6/patches/MOM_io_infra.F90.patch b/MOM6/patches/MOM_io_infra.F90.patch index d631f31..79e150c 100644 --- a/MOM6/patches/MOM_io_infra.F90.patch +++ b/MOM6/patches/MOM_io_infra.F90.patch @@ -1,6 +1,8 @@ ---- ../MOM6/config_src/infra/FMS2/MOM_io_infra.F90 2024-10-23 10:07:33.000000000 +1100 -+++ ../MOM6/config_src/infra/FMS2/MOM_io_infra.F90.new 2024-10-23 10:16:45.000000000 +1100 -@@ -376,8 +376,7 @@ +diff --git a/MOM6/config_src/infra/FMS2/MOM_io_infra.F90 b/MOM6/config_src/infra/FMS2/MOM_io_infra.F90.new +index a43b4e9..169ed25 100644 +--- a/MOM6/config_src/infra/FMS2/MOM_io_infra.F90 ++++ b/MOM6/config_src/infra/FMS2/MOM_io_infra.F90.new +@@ -376,8 +376,7 @@ subroutine open_ASCII_file(unit, file, action, threading, fileset) logical :: exists logical :: is_open character(len=6) :: action_arg, position_arg @@ -10,7 +12,7 @@ ! NOTE: This function is written to emulate the original behavior of mpp_open ! from the FMS1 library, on which the MOM API is still based. Much of this ! can be removed if we choose to drop this compatibility, but for now we -@@ -433,12 +432,12 @@ +@@ -433,12 +432,12 @@ subroutine open_ASCII_file(unit, file, action, threading, fileset) endif endif diff --git a/MOM6/patches/mom_cap.F90.patch b/MOM6/patches/mom_cap.F90.patch index dee5a39..dbd5b8d 100644 --- a/MOM6/patches/mom_cap.F90.patch +++ b/MOM6/patches/mom_cap.F90.patch @@ -1,5 +1,5 @@ diff --git a/MOM6/config_src/drivers/nuopc_cap/mom_cap.F90 b/MOM6/config_src/drivers/nuopc_cap/mom_cap.F90.new -index 3574943..f948684 100644 +index fab6fe1..541d7f1 100644 --- a/MOM6/config_src/drivers/nuopc_cap/mom_cap.F90 +++ b/MOM6/config_src/drivers/nuopc_cap/mom_cap.F90.new @@ -2,8 +2,9 @@ @@ -53,7 +53,7 @@ index 3574943..f948684 100644 end type !> Wrapper-derived type required to associate an internal state instance -@@ -408,6 +422,10 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) +@@ -416,6 +430,10 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) type (ocean_public_type), pointer :: ocean_public => NULL() type (ocean_state_type), pointer :: ocean_state => NULL() type(ice_ocean_boundary_type), pointer :: Ice_ocean_boundary => NULL() @@ -64,7 +64,7 @@ index 3574943..f948684 100644 type(ocean_internalstate_wrapper) :: ocean_internalstate type(ocean_grid_type), pointer :: ocean_grid => NULL() type(directories) :: dirs -@@ -439,6 +457,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) +@@ -447,6 +465,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) character(len=512) :: restartfile ! Path/Name of restart file character(len=2048) :: restartfiles ! Path/Name of restart files ! (same as restartfile if single restart file) @@ -72,7 +72,7 @@ index 3574943..f948684 100644 character(len=*), parameter :: subname='(MOM_cap:InitializeAdvertise)' character(len=32) :: calendar character(len=:), allocatable :: rpointer_filename -@@ -517,6 +536,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) +@@ -525,6 +544,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) if (chkerr(rc,__LINE__,u_FILE_u)) return call MOM_infra_init(mpi_comm_mom) @@ -81,7 +81,7 @@ index 3574943..f948684 100644 ! determine the calendar if (cesm_coupled) then call NUOPC_CompAttributeGet(gcomp, name="calendar", value=cvalue, & -@@ -648,13 +669,44 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) +@@ -656,13 +677,44 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) endif @@ -126,7 +126,7 @@ index 3574943..f948684 100644 ! GMM, this call is not needed in CESM. Check with EMC if it can be deleted. call ocean_model_flux_init(ocean_state) -@@ -721,6 +773,31 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) +@@ -729,6 +781,31 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) Ice_ocean_boundary%hcond = 0.0 endif @@ -158,7 +158,7 @@ index 3574943..f948684 100644 call query_ocean_state(ocean_state, use_waves=use_waves, wave_method=wave_method) if (use_waves) then if (wave_method == "EFACTOR") then -@@ -789,6 +866,15 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) +@@ -797,6 +874,15 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) endif endif @@ -174,7 +174,7 @@ index 3574943..f948684 100644 !--------- export fields ------------- call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_omask" , "will provide") call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_t" , "will provide") -@@ -800,6 +886,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) +@@ -808,6 +894,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) call fld_list_add(fldsFrOcn_num, fldsFrOcn, "Fioo_q" , "will provide") call fld_list_add(fldsFrOcn_num, fldsFrOcn, "So_bldepth" , "will provide") @@ -183,7 +183,7 @@ index 3574943..f948684 100644 do n = 1,fldsToOcn_num call NUOPC_Advertise(importState, standardName=fldsToOcn(n)%stdname, name=fldsToOcn(n)%shortname, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return -@@ -1611,11 +1699,14 @@ subroutine ModelAdvance(gcomp, rc) +@@ -1619,11 +1707,14 @@ subroutine ModelAdvance(gcomp, rc) type (ocean_public_type), pointer :: ocean_public => NULL() type (ocean_state_type), pointer :: ocean_state => NULL() type(ice_ocean_boundary_type), pointer :: Ice_ocean_boundary => NULL() @@ -198,7 +198,7 @@ index 3574943..f948684 100644 integer :: dth, dtm, dts integer :: nc type(ESMF_Time) :: MyTime -@@ -1627,12 +1718,13 @@ subroutine ModelAdvance(gcomp, rc) +@@ -1635,12 +1726,13 @@ subroutine ModelAdvance(gcomp, rc) integer :: writeunit integer :: localPet type(ESMF_VM) :: vm @@ -213,7 +213,7 @@ index 3574943..f948684 100644 integer :: num_rest_files real(8) :: MPI_Wtime, timers logical :: write_restart -@@ -1673,6 +1765,7 @@ subroutine ModelAdvance(gcomp, rc) +@@ -1683,6 +1775,7 @@ subroutine ModelAdvance(gcomp, rc) Time_step_coupled = esmf2fms_time(timeStep) Time = esmf2fms_time(currTime) @@ -221,7 +221,7 @@ index 3574943..f948684 100644 !--------------- ! Apply ocean lag for startup runs: -@@ -1748,8 +1841,39 @@ subroutine ModelAdvance(gcomp, rc) +@@ -1758,8 +1851,39 @@ subroutine ModelAdvance(gcomp, rc) ! Import data !--------------- @@ -261,7 +261,7 @@ index 3574943..f948684 100644 !--------------- ! Update MOM6 -@@ -1811,7 +1935,7 @@ subroutine ModelAdvance(gcomp, rc) +@@ -1831,7 +1955,7 @@ subroutine ModelAdvance(gcomp, rc) ! determine restart filename call ESMF_ClockGetNextTime(clock, MyTime, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return @@ -270,7 +270,7 @@ index 3574943..f948684 100644 if (ChkErr(rc,__LINE__,u_FILE_u)) return if (cesm_coupled) then -@@ -1869,6 +1993,14 @@ subroutine ModelAdvance(gcomp, rc) +@@ -1889,6 +2013,14 @@ subroutine ModelAdvance(gcomp, rc) endif @@ -285,7 +285,7 @@ index 3574943..f948684 100644 if (is_root_pe()) then write(stdout,*) subname//' writing restart file ',trim(restartname) endif -@@ -2149,6 +2281,7 @@ subroutine ocean_model_finalize(gcomp, rc) +@@ -2169,6 +2301,7 @@ subroutine ocean_model_finalize(gcomp, rc) integer :: alarmCount character(len=64) :: timestamp logical :: write_restart @@ -293,7 +293,7 @@ index 3574943..f948684 100644 character(len=*),parameter :: subname='(MOM_cap:ocean_model_finalize)' real(8) :: MPI_Wtime, timefs -@@ -2182,6 +2315,18 @@ subroutine ocean_model_finalize(gcomp, rc) +@@ -2202,6 +2335,18 @@ subroutine ocean_model_finalize(gcomp, rc) call ocean_model_end(ocean_public, ocean_State, Time, write_restart=write_restart) diff --git a/MOM6/patches/mom_cap_methods.F90.patch b/MOM6/patches/mom_cap_methods.F90.patch index b87c0b2..c5daf29 100644 --- a/MOM6/patches/mom_cap_methods.F90.patch +++ b/MOM6/patches/mom_cap_methods.F90.patch @@ -1,5 +1,5 @@ diff --git a/MOM6/config_src/drivers/nuopc_cap/mom_cap_methods.F90 b/MOM6/config_src/drivers/nuopc_cap/mom_cap_methods.F90.new -index 125bae5..67f3314 100644 +index 125bae5..3f81f6a 100644 --- a/MOM6/config_src/drivers/nuopc_cap/mom_cap_methods.F90 +++ b/MOM6/config_src/drivers/nuopc_cap/mom_cap_methods.F90.new @@ -20,8 +20,15 @@ use MOM_ocean_model_nuopc, only: ocean_public_type, ocean_state_type @@ -18,25 +18,26 @@ index 125bae5..67f3314 100644 ! By default make data private implicit none; private -@@ -72,11 +79,16 @@ end subroutine mom_set_geomtype +@@ -72,11 +79,17 @@ end subroutine mom_set_geomtype !> This function has a few purposes: !! (1) it imports surface fluxes using data from the mediator; and !! (2) it can apply restoring in SST and SSS. -subroutine mom_import(ocean_public, ocean_grid, importState, ice_ocean_boundary, rc) -+!! (3) optional: if atm_fields is provided, it imports and sets the fields in atm_fields required for the -+!! calculation of coupled generic tracer fluxes ++!! (3) optional: if atm_fields is provided, it imports and sets the fields in atm_fields required ++!! for the calculation of coupled generic tracer fluxes +subroutine mom_import(ocean_public, ocean_grid, importState, ice_ocean_boundary, atm_fields, rc) type(ocean_public_type) , intent(in) :: ocean_public !< Ocean surface state type(ocean_grid_type) , intent(in) :: ocean_grid !< Ocean model grid type(ESMF_State) , intent(inout) :: importState !< incoming data from mediator type(ice_ocean_boundary_type) , intent(inout) :: ice_ocean_boundary !< Ocean boundary forcing -+ type(coupler_2d_bc_type), optional, intent(inout) :: atm_fields !< If present, this type describes the atmospheric -+ !! tracer fields to be imported for the calculation -+ !! of generic tracer fluxes. ++ type(coupler_2d_bc_type), optional, intent(inout) :: atm_fields !< If present, this type ++ !! describes the atmospheric tracer fields to ++ !! be imported for the calculation of generic ++ !! tracer fluxes. integer , intent(inout) :: rc !< Return code ! Local Variables -@@ -88,7 +100,10 @@ subroutine mom_import(ocean_public, ocean_grid, importState, ice_ocean_boundary, +@@ -88,7 +101,10 @@ subroutine mom_import(ocean_public, ocean_grid, importState, ice_ocean_boundary, real(ESMF_KIND_R8), allocatable :: tauy(:,:) real(ESMF_KIND_R8), allocatable :: stkx(:,:,:) real(ESMF_KIND_R8), allocatable :: stky(:,:,:) @@ -47,7 +48,7 @@ index 125bae5..67f3314 100644 rc = ESMF_SUCCESS -@@ -364,6 +379,48 @@ subroutine mom_import(ocean_public, ocean_grid, importState, ice_ocean_boundary, +@@ -364,6 +380,48 @@ subroutine mom_import(ocean_public, ocean_grid, importState, ice_ocean_boundary, deallocate(stkx,stky) endif diff --git a/MOM6/patches/mom_ocean_model_nuopc.F90.patch b/MOM6/patches/mom_ocean_model_nuopc.F90.patch index 273a96a..1100381 100644 --- a/MOM6/patches/mom_ocean_model_nuopc.F90.patch +++ b/MOM6/patches/mom_ocean_model_nuopc.F90.patch @@ -1,8 +1,8 @@ diff --git a/MOM6/config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90 b/MOM6/config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90.new -index 04b60b0..9855c24 100644 +index 9ac40da..b6cc4de 100644 --- a/MOM6/config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90 +++ b/MOM6/config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90.new -@@ -19,6 +19,7 @@ use MOM_coms, only : field_chksum +@@ -20,6 +20,7 @@ use MOM_coms, only : field_chksum use MOM_constants, only : CELSIUS_KELVIN_OFFSET, hlf use MOM_diag_mediator, only : diag_ctrl, enable_averages, disable_averaging use MOM_diag_mediator, only : diag_mediator_close_registration, diag_mediator_end @@ -28,9 +28,9 @@ index 04b60b0..9855c24 100644 !! Following MOM5, stagger is BGRID_NE by default when the !! ocean is initialized, but here it is set to -999 so that !! a global max across ocean and non-ocean processors can be -@@ -410,14 +409,7 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, gas_fields_ocn, i +@@ -407,14 +406,7 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, gas_fields_ocn, i ! it also initializes statistical waves. - call MOM_wave_interface_init(OS%Time, OS%grid, OS%GV, OS%US, param_file, OS%Waves, OS%diag, OS%restart_CSp) + call MOM_wave_interface_init(OS%Time, OS%grid, OS%GV, OS%US, param_file, OS%Waves, OS%diag) - if (associated(OS%grid%Domain%maskmap)) then - call initialize_ocean_public_type(OS%grid%Domain%mpp_domain, Ocean_sfc, & @@ -44,7 +44,7 @@ index 04b60b0..9855c24 100644 ! This call can only occur here if the coupler_bc_type variables have been ! initialized already using the information from gas_fields_ocn. -@@ -532,8 +524,7 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, & +@@ -529,8 +521,7 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, & (/is,is,ie,ie/), (/js,js,je,je/), as_needed=.true.) ! Translate Ice_ocean_boundary into fluxes. @@ -54,7 +54,7 @@ index 04b60b0..9855c24 100644 weight = 1.0 -@@ -795,7 +786,7 @@ end subroutine ocean_model_end +@@ -792,7 +783,7 @@ end subroutine ocean_model_end subroutine ocean_model_save_restart(OS, Time, directory, filename_suffix) type(ocean_state_type), pointer :: OS !< A pointer to the structure containing the !! internal ocean state (in). @@ -63,7 +63,7 @@ index 04b60b0..9855c24 100644 character(len=*), optional, intent(in) :: directory !< An optional directory into which to !! write these restart files. character(len=*), optional, intent(in) :: filename_suffix !< An optional suffix (e.g., a time-stamp) -@@ -827,16 +818,12 @@ subroutine ocean_model_save_restart(OS, Time, directory, filename_suffix) +@@ -823,16 +814,12 @@ subroutine ocean_model_save_restart(OS, Time, directory, filename_suffix) end subroutine ocean_model_save_restart !> Initialize the public ocean type @@ -85,7 +85,7 @@ index 04b60b0..9855c24 100644 type(coupler_1d_bc_type), & optional, intent(in) :: gas_fields_ocn !< If present, this type describes the !! ocean and surface-ice fields that will participate -@@ -848,14 +835,9 @@ subroutine initialize_ocean_public_type(input_domain, Ocean_sfc, diag, maskmap, +@@ -844,14 +831,9 @@ subroutine initialize_ocean_public_type(input_domain, Ocean_sfc, diag, maskmap, ! and have no halos. integer :: isc, iec, jsc, jec @@ -103,7 +103,7 @@ index 04b60b0..9855c24 100644 allocate ( Ocean_sfc%t_surf (isc:iec,jsc:jec), & Ocean_sfc%s_surf (isc:iec,jsc:jec), & -@@ -911,8 +893,7 @@ subroutine convert_state_to_ocean_type(sfc_state, Ocean_sfc, G, US, patm, press_ +@@ -907,8 +889,7 @@ subroutine convert_state_to_ocean_type(sfc_state, Ocean_sfc, G, US, patm, press_ is = G%isc ; ie = G%iec ; js = G%jsc ; je = G%jec call pass_vector(sfc_state%u, sfc_state%v, G%Domain)