From 0a42b834c05ea357c6033622cf362185a4d51f01 Mon Sep 17 00:00:00 2001 From: Alistair Adcroft Date: Mon, 13 Jun 2016 13:16:58 -0400 Subject: [PATCH] Moved ocean_OBC_type from MOM_variables to MOM_open_boundary - The ocean_OBC_type and OBC enumerated parameters (e.g. OBC_FLATHER_E) have been moved to MOM_open_boundary.F90 from MOM_variable.F90 in an attempt to consolidate code before refactoring and changing the way we control OBCs. - MOM_open_boundary.F90 seemed to only include Orkanski radiation code (used in baroclinic mode) and yet stored some of the radiation data in the ocean_OBS_type which is where all the Flather data and OBC masks is kept. - No answer changes. --- src/core/MOM.F90 | 3 +- src/core/MOM_barotropic.F90 | 6 +-- src/core/MOM_continuity.F90 | 3 +- src/core/MOM_continuity_PPM.F90 | 5 +- src/core/MOM_dynamics_legacy_split.F90 | 3 +- src/core/MOM_dynamics_split_RK2.F90 | 3 +- src/core/MOM_dynamics_unsplit.F90 | 3 +- src/core/MOM_dynamics_unsplit_RK2.F90 | 3 +- src/core/MOM_legacy_barotropic.F90 | 6 +-- src/core/MOM_open_boundary.F90 | 54 ++++++++++++++++++- src/core/MOM_variables.F90 | 53 ------------------ .../MOM_state_initialization.F90 | 7 +-- .../lateral/MOM_hor_visc.F90 | 4 +- .../vertical/MOM_set_viscosity.F90 | 2 +- .../vertical/MOM_vert_friction.F90 | 3 +- src/tracer/DOME_tracer.F90 | 3 +- src/tracer/MOM_OCMIP2_CFC.F90 | 3 +- src/tracer/MOM_tracer_advect.F90 | 4 +- src/tracer/MOM_tracer_flow_control.F90 | 3 +- src/tracer/MOM_tracer_hor_diff.F90 | 5 +- src/tracer/advection_test_tracer.F90 | 3 +- src/tracer/dye_example.F90 | 3 +- src/tracer/ideal_age_example.F90 | 3 +- src/tracer/oil_tracer.F90 | 3 +- src/tracer/tracer_example.F90 | 3 +- src/user/DOME2d_initialization.F90 | 2 +- src/user/DOME_initialization.F90 | 3 +- src/user/ISOMIP_initialization.F90 | 2 +- src/user/Phillips_initialization.F90 | 4 +- src/user/Rossby_front_2d_initialization.F90 | 2 +- src/user/adjustment_initialization.F90 | 2 +- src/user/benchmark_initialization.F90 | 3 +- src/user/circle_obcs_initialization.F90 | 4 +- src/user/external_gwave_initialization.F90 | 2 +- src/user/lock_exchange_initialization.F90 | 2 +- src/user/seamount_initialization.F90 | 4 +- src/user/sloshing_initialization.F90 | 4 +- src/user/user_initialization.F90 | 5 +- 38 files changed, 122 insertions(+), 108 deletions(-) diff --git a/src/core/MOM.F90 b/src/core/MOM.F90 index 3afd5de7de..cc2f199989 100644 --- a/src/core/MOM.F90 +++ b/src/core/MOM.F90 @@ -3,7 +3,8 @@ module MOM ! This file is part of MOM6. See LICENSE.md for the license. -use MOM_variables, only : vertvisc_type, ocean_OBC_type +use MOM_variables, only : vertvisc_type +use MOM_open_boundary, only : ocean_OBC_type ! A Structure with pointers to forcing fields to drive MOM; ! all fluxes are positive downward. diff --git a/src/core/MOM_barotropic.F90 b/src/core/MOM_barotropic.F90 index 73a679bb65..61caee0b5b 100644 --- a/src/core/MOM_barotropic.F90 +++ b/src/core/MOM_barotropic.F90 @@ -105,13 +105,13 @@ module MOM_barotropic use MOM_grid, only : ocean_grid_type use MOM_hor_index, only : hor_index_type use MOM_io, only : vardesc, var_desc +use MOM_open_boundary, only : ocean_OBC_type, OBC_SIMPLE, OBC_NONE +use MOM_open_boundary, only : OBC_FLATHER_E, OBC_FLATHER_W +use MOM_open_boundary, only : OBC_FLATHER_N, OBC_FLATHER_S use MOM_restart, only : register_restart_field, query_initialized, MOM_restart_CS use MOM_tidal_forcing, only : tidal_forcing_sensitivity, tidal_forcing_CS use MOM_time_manager, only : time_type, set_time, operator(+), operator(-) use MOM_variables, only : BT_cont_type, alloc_bt_cont_type -use MOM_variables, only : ocean_OBC_type, OBC_SIMPLE, OBC_NONE -use MOM_variables, only : OBC_FLATHER_E, OBC_FLATHER_W -use MOM_variables, only : OBC_FLATHER_N, OBC_FLATHER_S use MOM_verticalGrid, only : verticalGrid_type implicit none ; private diff --git a/src/core/MOM_continuity.F90 b/src/core/MOM_continuity.F90 index 99e58ebf1a..555484057d 100644 --- a/src/core/MOM_continuity.F90 +++ b/src/core/MOM_continuity.F90 @@ -47,7 +47,8 @@ module MOM_continuity use MOM_file_parser, only : get_param, log_version, param_file_type use MOM_string_functions, only : uppercase use MOM_grid, only : ocean_grid_type -use MOM_variables, only : ocean_OBC_type, BT_cont_type +use MOM_open_boundary, only : ocean_OBC_type +use MOM_variables, only : BT_cont_type use MOM_verticalGrid, only : verticalGrid_type implicit none ; private diff --git a/src/core/MOM_continuity_PPM.F90 b/src/core/MOM_continuity_PPM.F90 index de0285c2a0..8a31121f1c 100644 --- a/src/core/MOM_continuity_PPM.F90 +++ b/src/core/MOM_continuity_PPM.F90 @@ -48,8 +48,9 @@ module MOM_continuity_PPM use MOM_error_handler, only : MOM_error, FATAL, WARNING, is_root_pe use MOM_file_parser, only : get_param, log_version, param_file_type use MOM_grid, only : ocean_grid_type -use MOM_variables, only : ocean_OBC_type, BT_cont_type, OBC_SIMPLE -use MOM_variables, only : OBC_FLATHER_E, OBC_FLATHER_W, OBC_FLATHER_N, OBC_FLATHER_S +use MOM_open_boundary, only : ocean_OBC_type, OBC_SIMPLE +use MOM_open_boundary, only : OBC_FLATHER_E, OBC_FLATHER_W, OBC_FLATHER_N, OBC_FLATHER_S +use MOM_variables, only : BT_cont_type use MOM_verticalGrid, only : verticalGrid_type implicit none ; private diff --git a/src/core/MOM_dynamics_legacy_split.F90 b/src/core/MOM_dynamics_legacy_split.F90 index 8fe4508b24..3ad5c3363c 100644 --- a/src/core/MOM_dynamics_legacy_split.F90 +++ b/src/core/MOM_dynamics_legacy_split.F90 @@ -66,7 +66,8 @@ module MOM_dynamics_legacy_split !********+*********+*********+*********+*********+*********+*********+** -use MOM_variables, only : vertvisc_type, ocean_OBC_type, thermo_var_ptrs +use MOM_open_boundary, only : ocean_OBC_type +use MOM_variables, only : vertvisc_type, thermo_var_ptrs use MOM_variables, only : BT_cont_type, alloc_bt_cont_type, dealloc_bt_cont_type use MOM_variables, only : accel_diag_ptrs, ocean_internal_state, cont_diag_ptrs use MOM_forcing_type, only : forcing diff --git a/src/core/MOM_dynamics_split_RK2.F90 b/src/core/MOM_dynamics_split_RK2.F90 index 2e112bf274..b65ab8281c 100644 --- a/src/core/MOM_dynamics_split_RK2.F90 +++ b/src/core/MOM_dynamics_split_RK2.F90 @@ -3,7 +3,7 @@ module MOM_dynamics_split_RK2 ! This file is part of MOM6. See LICENSE.md for the license. -use MOM_variables, only : vertvisc_type, ocean_OBC_type, thermo_var_ptrs +use MOM_variables, only : vertvisc_type, thermo_var_ptrs use MOM_variables, only : BT_cont_type, alloc_bt_cont_type, dealloc_bt_cont_type use MOM_variables, only : accel_diag_ptrs, ocean_internal_state, cont_diag_ptrs use MOM_forcing_type, only : forcing @@ -45,6 +45,7 @@ module MOM_dynamics_split_RK2 use MOM_interface_heights, only : find_eta use MOM_lateral_mixing_coeffs, only : VarMix_CS use MOM_MEKE_types, only : MEKE_type +use MOM_open_boundary, only : ocean_OBC_type use MOM_open_boundary, only : Radiation_Open_Bdry_Conds, open_boundary_init use MOM_open_boundary, only : open_boundary_CS use MOM_PressureForce, only : PressureForce, PressureForce_init, PressureForce_CS diff --git a/src/core/MOM_dynamics_unsplit.F90 b/src/core/MOM_dynamics_unsplit.F90 index 7b4a4d4960..6c50d2b80a 100644 --- a/src/core/MOM_dynamics_unsplit.F90 +++ b/src/core/MOM_dynamics_unsplit.F90 @@ -68,7 +68,7 @@ module MOM_dynamics_unsplit !********+*********+*********+*********+*********+*********+*********+** -use MOM_variables, only : vertvisc_type, ocean_OBC_type, thermo_var_ptrs +use MOM_variables, only : vertvisc_type, thermo_var_ptrs use MOM_variables, only : accel_diag_ptrs, ocean_internal_state, cont_diag_ptrs use MOM_forcing_type, only : forcing use MOM_checksum_packages, only : MOM_thermo_chksum, MOM_state_chksum, MOM_accel_chksum @@ -102,6 +102,7 @@ module MOM_dynamics_unsplit use MOM_interface_heights, only : find_eta use MOM_lateral_mixing_coeffs, only : VarMix_CS use MOM_MEKE_types, only : MEKE_type +use MOM_open_boundary, only : ocean_OBC_type use MOM_open_boundary, only : Radiation_Open_Bdry_Conds, open_boundary_init use MOM_open_boundary, only : open_boundary_CS use MOM_PressureForce, only : PressureForce, PressureForce_init, PressureForce_CS diff --git a/src/core/MOM_dynamics_unsplit_RK2.F90 b/src/core/MOM_dynamics_unsplit_RK2.F90 index 72e4f56613..7055547e0a 100644 --- a/src/core/MOM_dynamics_unsplit_RK2.F90 +++ b/src/core/MOM_dynamics_unsplit_RK2.F90 @@ -65,7 +65,7 @@ module MOM_dynamics_unsplit_RK2 !* * !********+*********+*********+*********+*********+*********+*********+** -use MOM_variables, only : vertvisc_type, ocean_OBC_type, thermo_var_ptrs +use MOM_variables, only : vertvisc_type, thermo_var_ptrs use MOM_variables, only : ocean_internal_state, accel_diag_ptrs, cont_diag_ptrs use MOM_forcing_type, only : forcing use MOM_checksum_packages, only : MOM_thermo_chksum, MOM_state_chksum, MOM_accel_chksum @@ -100,6 +100,7 @@ module MOM_dynamics_unsplit_RK2 use MOM_hor_visc, only : horizontal_viscosity, hor_visc_init, hor_visc_CS use MOM_lateral_mixing_coeffs, only : VarMix_CS use MOM_MEKE_types, only : MEKE_type +use MOM_open_boundary, only : ocean_OBC_type use MOM_open_boundary, only : Radiation_Open_Bdry_Conds, open_boundary_init use MOM_open_boundary, only : open_boundary_CS use MOM_PressureForce, only : PressureForce, PressureForce_init, PressureForce_CS diff --git a/src/core/MOM_legacy_barotropic.F90 b/src/core/MOM_legacy_barotropic.F90 index 0b15fb6f3f..c6f077ec6a 100644 --- a/src/core/MOM_legacy_barotropic.F90 +++ b/src/core/MOM_legacy_barotropic.F90 @@ -107,13 +107,13 @@ module MOM_legacy_barotropic use MOM_grid, only : ocean_grid_type use MOM_hor_index, only : hor_index_type use MOM_io, only : vardesc, var_desc +use MOM_open_boundary, only : ocean_OBC_type, OBC_SIMPLE, OBC_NONE +use MOM_open_boundary, only : OBC_FLATHER_E, OBC_FLATHER_W +use MOM_open_boundary, only : OBC_FLATHER_N, OBC_FLATHER_S use MOM_restart, only : register_restart_field, query_initialized, MOM_restart_CS use MOM_tidal_forcing, only : tidal_forcing_sensitivity, tidal_forcing_CS use MOM_time_manager, only : time_type, set_time, operator(+), operator(-) use MOM_variables, only : BT_cont_type, alloc_bt_cont_type -use MOM_variables, only : ocean_OBC_type, OBC_SIMPLE, OBC_NONE -use MOM_variables, only : OBC_FLATHER_E, OBC_FLATHER_W -use MOM_variables, only : OBC_FLATHER_N, OBC_FLATHER_S use MOM_verticalGrid, only : verticalGrid_type implicit none ; private diff --git a/src/core/MOM_open_boundary.F90 b/src/core/MOM_open_boundary.F90 index b7db0be985..8f78795c2a 100644 --- a/src/core/MOM_open_boundary.F90 +++ b/src/core/MOM_open_boundary.F90 @@ -46,8 +46,6 @@ module MOM_open_boundary use MOM_error_handler, only : MOM_mesg, MOM_error, FATAL, WARNING use MOM_file_parser, only : get_param, log_version, param_file_type use MOM_grid, only : ocean_grid_type -use MOM_variables, only : ocean_OBC_type, OBC_NONE, OBC_SIMPLE -use MOM_variables, only : OBC_FLATHER_E, OBC_FLATHER_W, OBC_FLATHER_N, OBC_FLATHER_S implicit none ; private @@ -69,6 +67,58 @@ module MOM_open_boundary ! default value is 10 m s-1. end type open_boundary_CS +integer, parameter, public :: OBC_NONE = 0, OBC_SIMPLE = 1, OBC_WALL = 2 +integer, parameter, public :: OBC_FLATHER_E = 4, OBC_FLATHER_W = 5 +integer, parameter, public :: OBC_FLATHER_N = 6, OBC_FLATHER_S = 7 + +type, public :: ocean_OBC_type +! This structure is used to apply specified open boundary conditions. + logical :: apply_OBC_u_flather_east = .false. ! If true, some zonal velocity + logical :: apply_OBC_u_flather_west = .false. ! points in the local domain use flather open + ! boundary conditions. + logical :: apply_OBC_v_flather_north = .false. ! If true, some meridional velocity + logical :: apply_OBC_v_flather_south = .false. ! points in the local domain use flather open + ! boundary conditions. + logical :: apply_OBC_u = .false. ! If true, some zonal or meridional velocity + logical :: apply_OBC_v = .false. ! points in the local domain use open + ! boundary conditions. + logical, pointer, dimension(:,:) :: & + OBC_mask_u => NULL(), & ! These arrays are true at zonal or meridional + OBC_mask_v => NULL() ! velocity points that have prescribed open boundary + ! conditions. + integer, pointer, dimension(:,:) :: & + OBC_kind_u => NULL(), & ! These arrays indicate the kind of open boundary + OBC_kind_v => NULL() ! conditions that are to be applied at the u and v + ! points, and can be OBC_NONE, OBC_SIMPLE, OBC_WALL, + ! or one of OBC_FLATHER_[EWNS]. Generally these + ! should be consistent with OBC_mask_[uv], with + ! OBC_mask_[uv] .false. for OBC_kind_[uv] = NONE + ! and true for all other values. + ! The following apply at points with OBC_kind_[uv] = OBC_FLATHER_x. + real, pointer, dimension(:,:,:) :: & + rx_old_u => NULL(), & ! The rx_old_u value for radiation coeff for u-velocity in x-direction + ry_old_v => NULL(), & ! The ry_old_v value for radiation coeff for v-velocity in y-direction + rx_old_h => NULL(), & ! The rx_old_h value for radiation coeff for layer thickness h in x-direction + ry_old_h => NULL() ! The ry_old_h value for radiation coeff for layer thickness h in y-direction + + ! The following can be used to specify the outer-domain values of the + ! surface height and barotropic velocity. If these are not allocated, the + ! default with Flather boundary conditions is the same as if they were + ! filled with zeros. With simple OBCs, these should not be allocated. + real, pointer, dimension(:,:) :: & + ubt_outer => NULL(), & ! The u-velocity in the outer domain, in m s-1. + vbt_outer => NULL(), & ! The v-velocity in the outer domain, in m s-1. + eta_outer_u => NULL(), & ! The sea surface height anomaly or water column + eta_outer_v => NULL() ! mass anomaly in the outer domain in m or kg m-2. + + ! The following apply at points with OBC_kind_[uv] = OBC_SIMPLE. + real, pointer, dimension(:,:,:) :: & + u => NULL(), & ! The prescribed values of the zonal (u) or meridional (v) + v => NULL(), & ! velocities at OBC points, in m s-1. + uh => NULL(), & ! The prescribed values of the zonal (uh) or meridional (vh) + vh => NULL() ! volume transports at OBC points, in m3 s-1. +end type ocean_OBC_type + integer :: id_clock_pass contains diff --git a/src/core/MOM_variables.F90 b/src/core/MOM_variables.F90 index 42a619c9b9..fa1b2da980 100644 --- a/src/core/MOM_variables.F90 +++ b/src/core/MOM_variables.F90 @@ -235,59 +235,6 @@ module MOM_variables ! at the interfaces between each layer, in m2 s-2. end type vertvisc_type -integer, parameter, public :: OBC_NONE = 0, OBC_SIMPLE = 1, OBC_WALL = 2 -integer, parameter, public :: OBC_FLATHER_E = 4, OBC_FLATHER_W = 5 -integer, parameter, public :: OBC_FLATHER_N = 6, OBC_FLATHER_S = 7 - -type, public :: ocean_OBC_type -! This structure is used to apply specified open boundary conditions. - logical :: apply_OBC_u_flather_east = .false. ! If true, some zonal velocity - logical :: apply_OBC_u_flather_west = .false. ! points in the local domain use flather open - ! boundary conditions. - logical :: apply_OBC_v_flather_north = .false. ! If true, some meridional velocity - logical :: apply_OBC_v_flather_south = .false. ! points in the local domain use flather open - ! boundary conditions. - logical :: apply_OBC_u = .false. ! If true, some zonal or meridional velocity - logical :: apply_OBC_v = .false. ! points in the local domain use open - ! boundary conditions. - logical, pointer, dimension(:,:) :: & - OBC_mask_u => NULL(), & ! These arrays are true at zonal or meridional - OBC_mask_v => NULL() ! velocity points that have prescribed open boundary - ! conditions. - integer, pointer, dimension(:,:) :: & - OBC_kind_u => NULL(), & ! These arrays indicate the kind of open boundary - OBC_kind_v => NULL() ! conditions that are to be applied at the u and v - ! points, and can be OBC_NONE, OBC_SIMPLE, OBC_WALL, - ! or one of OBC_FLATHER_[EWNS]. Generally these - ! should be consistent with OBC_mask_[uv], with - ! OBC_mask_[uv] .false. for OBC_kind_[uv] = NONE - ! and true for all other values. - ! The following apply at points with OBC_kind_[uv] = OBC_FLATHER_x. - real, pointer, dimension(:,:,:) :: & - rx_old_u => NULL(), & ! The rx_old_u value for radiation coeff for u-velocity in x-direction - ry_old_v => NULL(), & ! The ry_old_v value for radiation coeff for v-velocity in y-direction - rx_old_h => NULL(), & ! The rx_old_h value for radiation coeff for layer thickness h in x-direction - ry_old_h => NULL() ! The ry_old_h value for radiation coeff for layer thickness h in y-direction - - ! The following can be used to specify the outer-domain values of the - ! surface height and barotropic velocity. If these are not allocated, the - ! default with Flather boundary conditions is the same as if they were - ! filled with zeros. With simple OBCs, these should not be allocated. - real, pointer, dimension(:,:) :: & - ubt_outer => NULL(), & ! The u-velocity in the outer domain, in m s-1. - vbt_outer => NULL(), & ! The v-velocity in the outer domain, in m s-1. - eta_outer_u => NULL(), & ! The sea surface height anomaly or water column - eta_outer_v => NULL() ! mass anomaly in the outer domain in m or kg m-2. - - ! The following apply at points with OBC_kind_[uv] = OBC_SIMPLE. - real, pointer, dimension(:,:,:) :: & - u => NULL(), & ! The prescribed values of the zonal (u) or meridional (v) - v => NULL(), & ! velocities at OBC points, in m s-1. - uh => NULL(), & ! The prescribed values of the zonal (uh) or meridional (vh) - vh => NULL() ! volume transports at OBC points, in m3 s-1. -end type ocean_OBC_type - - type, public :: BT_cont_type real, pointer, dimension(:,:) :: & FA_u_EE => NULL(), & ! The FA_u_XX variables are the effective open face diff --git a/src/initialization/MOM_state_initialization.F90 b/src/initialization/MOM_state_initialization.F90 index 33f0f5634e..0f9568cd2c 100644 --- a/src/initialization/MOM_state_initialization.F90 +++ b/src/initialization/MOM_state_initialization.F90 @@ -21,6 +21,9 @@ module MOM_state_initialization use MOM_io, only : open_file, read_data, read_axis_data, SINGLE_FILE, MULTIPLE use MOM_io, only : slasher, vardesc, write_field use MOM_io, only : EAST_FACE, NORTH_FACE +use MOM_open_boundary, only : ocean_OBC_type +use MOM_open_boundary, only : OBC_NONE, OBC_SIMPLE, OBC_FLATHER_E, OBC_FLATHER_W +use MOM_open_boundary, only : OBC_FLATHER_N, OBC_FLATHER_S use MOM_grid_initialize, only : initialize_masks, set_grid_metrics use MOM_restart, only : restore_state, MOM_restart_CS use MOM_sponge, only : set_up_sponge_field, set_up_sponge_ML_density @@ -30,9 +33,7 @@ module MOM_state_initialization use MOM_string_functions, only : uppercase use MOM_time_manager, only : time_type, set_time use MOM_tracer_registry, only : add_tracer_OBC_values, tracer_registry_type -use MOM_variables, only : thermo_var_ptrs, ocean_OBC_type -use MOM_variables, only : OBC_NONE, OBC_SIMPLE, OBC_FLATHER_E, OBC_FLATHER_W -use MOM_variables, only : OBC_FLATHER_N, OBC_FLATHER_S +use MOM_variables, only : thermo_var_ptrs use MOM_verticalGrid, only : setVerticalGridAxes, verticalGrid_type use MOM_ALE, only : pressure_gradient_plm use MOM_EOS, only : calculate_density, calculate_density_derivs, EOS_type diff --git a/src/parameterizations/lateral/MOM_hor_visc.F90 b/src/parameterizations/lateral/MOM_hor_visc.F90 index 007804d62e..191eb62005 100644 --- a/src/parameterizations/lateral/MOM_hor_visc.F90 +++ b/src/parameterizations/lateral/MOM_hor_visc.F90 @@ -93,8 +93,8 @@ module MOM_hor_visc use MOM_grid, only : ocean_grid_type use MOM_lateral_mixing_coeffs, only : VarMix_CS use MOM_MEKE_types, only : MEKE_type -use MOM_variables, only : ocean_OBC_type, OBC_FLATHER_E, OBC_FLATHER_W -use MOM_variables, only : OBC_FLATHER_N, OBC_FLATHER_S +use MOM_open_boundary, only : ocean_OBC_type, OBC_FLATHER_E, OBC_FLATHER_W +use MOM_open_boundary, only : OBC_FLATHER_N, OBC_FLATHER_S use MOM_verticalGrid, only : verticalGrid_type implicit none ; private diff --git a/src/parameterizations/vertical/MOM_set_viscosity.F90 b/src/parameterizations/vertical/MOM_set_viscosity.F90 index 84fb3d2aa8..77434af853 100644 --- a/src/parameterizations/vertical/MOM_set_viscosity.F90 +++ b/src/parameterizations/vertical/MOM_set_viscosity.F90 @@ -64,7 +64,7 @@ module MOM_set_visc use MOM_io, only : vardesc, var_desc use MOM_restart, only : register_restart_field, MOM_restart_CS use MOM_variables, only : thermo_var_ptrs -use MOM_variables, only : vertvisc_type, ocean_OBC_type +use MOM_variables, only : vertvisc_type use MOM_verticalGrid, only : verticalGrid_type use MOM_EOS, only : calculate_density, calculate_density_derivs diff --git a/src/parameterizations/vertical/MOM_vert_friction.F90 b/src/parameterizations/vertical/MOM_vert_friction.F90 index 0a2cbf0d17..0ec1bc5dbe 100644 --- a/src/parameterizations/vertical/MOM_vert_friction.F90 +++ b/src/parameterizations/vertical/MOM_vert_friction.F90 @@ -82,12 +82,13 @@ module MOM_vert_friction use MOM_forcing_type, only : forcing use MOM_get_input, only : directories use MOM_grid, only : ocean_grid_type +use MOM_open_boundary, only : ocean_OBC_type, OBC_SIMPLE use MOM_PointAccel, only : write_u_accel, write_v_accel, PointAccel_init use MOM_PointAccel, only : PointAccel_CS use MOM_time_manager, only : time_type, time_type_to_real, operator(-) use MOM_variables, only : thermo_var_ptrs, vertvisc_type use MOM_variables, only : cont_diag_ptrs, accel_diag_ptrs -use MOM_variables, only : ocean_internal_state, ocean_OBC_type, OBC_SIMPLE +use MOM_variables, only : ocean_internal_state use MOM_verticalGrid, only : verticalGrid_type implicit none ; private diff --git a/src/tracer/DOME_tracer.F90 b/src/tracer/DOME_tracer.F90 index e7dcb22836..993b67eea9 100644 --- a/src/tracer/DOME_tracer.F90 +++ b/src/tracer/DOME_tracer.F90 @@ -62,13 +62,14 @@ module DOME_tracer use MOM_hor_index, only : hor_index_type use MOM_grid, only : ocean_grid_type use MOM_io, only : file_exists, read_data, slasher, vardesc, var_desc, query_vardesc +use MOM_open_boundary, only : ocean_OBC_type use MOM_restart, only : register_restart_field, MOM_restart_CS use MOM_sponge, only : set_up_sponge_field, sponge_CS use MOM_time_manager, only : time_type, get_time use MOM_tracer_registry, only : register_tracer, tracer_registry_type use MOM_tracer_registry, only : add_tracer_diagnostics, add_tracer_OBC_values use MOM_tracer_registry, only : tracer_vertdiff -use MOM_variables, only : surface, ocean_OBC_type +use MOM_variables, only : surface use MOM_verticalGrid, only : verticalGrid_type use coupler_util, only : set_coupler_values, ind_csurf diff --git a/src/tracer/MOM_OCMIP2_CFC.F90 b/src/tracer/MOM_OCMIP2_CFC.F90 index 41181f3ab8..8ad94af4c0 100644 --- a/src/tracer/MOM_OCMIP2_CFC.F90 +++ b/src/tracer/MOM_OCMIP2_CFC.F90 @@ -73,6 +73,7 @@ module MOM_OCMIP2_CFC use MOM_hor_index, only : hor_index_type use MOM_grid, only : ocean_grid_type use MOM_io, only : file_exists, read_data, slasher, vardesc, var_desc, query_vardesc +use MOM_open_boundary, only : ocean_OBC_type use MOM_restart, only : register_restart_field, query_initialized, MOM_restart_CS use MOM_sponge, only : set_up_sponge_field, sponge_CS use MOM_time_manager, only : time_type, get_time @@ -80,7 +81,7 @@ module MOM_OCMIP2_CFC use MOM_tracer_registry, only : add_tracer_diagnostics, add_tracer_OBC_values use MOM_tracer_registry, only : tracer_vertdiff use MOM_tracer_Z_init, only : tracer_Z_init -use MOM_variables, only : surface, ocean_OBC_type +use MOM_variables, only : surface use MOM_verticalGrid, only : verticalGrid_type use coupler_util, only : extract_coupler_values, set_coupler_values diff --git a/src/tracer/MOM_tracer_advect.F90 b/src/tracer/MOM_tracer_advect.F90 index 26ed11fe75..949039f7e5 100644 --- a/src/tracer/MOM_tracer_advect.F90 +++ b/src/tracer/MOM_tracer_advect.F90 @@ -14,9 +14,9 @@ module MOM_tracer_advect use MOM_error_handler, only : MOM_error, FATAL, WARNING, MOM_mesg, is_root_pe use MOM_file_parser, only : get_param, log_version, param_file_type use MOM_grid, only : ocean_grid_type +use MOM_open_boundary, only : ocean_OBC_type, OBC_FLATHER_E +use MOM_open_boundary, only : OBC_FLATHER_W, OBC_FLATHER_N, OBC_FLATHER_S use MOM_tracer_registry, only : tracer_registry_type, tracer_type, MOM_tracer_chksum -use MOM_variables, only : ocean_OBC_type, OBC_FLATHER_E -use MOM_variables, only : OBC_FLATHER_W, OBC_FLATHER_N, OBC_FLATHER_S use MOM_verticalGrid, only : verticalGrid_type implicit none ; private diff --git a/src/tracer/MOM_tracer_flow_control.F90 b/src/tracer/MOM_tracer_flow_control.F90 index 3a71eff968..49a40296c7 100644 --- a/src/tracer/MOM_tracer_flow_control.F90 +++ b/src/tracer/MOM_tracer_flow_control.F90 @@ -36,11 +36,12 @@ module MOM_tracer_flow_control use MOM_forcing_type, only : forcing, optics_type use MOM_grid, only : ocean_grid_type use MOM_hor_index, only : hor_index_type +use MOM_open_boundary, only : ocean_OBC_type use MOM_restart, only : MOM_restart_CS use MOM_sponge, only : sponge_CS use MOM_ALE_sponge, only : ALE_sponge_CS use MOM_tracer_registry, only : tracer_registry_type -use MOM_variables, only : surface, ocean_OBC_type, thermo_var_ptrs +use MOM_variables, only : surface, thermo_var_ptrs use MOM_verticalGrid, only : verticalGrid_type #include diff --git a/src/tracer/MOM_tracer_hor_diff.F90 b/src/tracer/MOM_tracer_hor_diff.F90 index 4a7c6e6799..73b581d299 100644 --- a/src/tracer/MOM_tracer_hor_diff.F90 +++ b/src/tracer/MOM_tracer_hor_diff.F90 @@ -21,9 +21,10 @@ module MOM_tracer_hor_diff use MOM_neutral_diffusion, only : neutral_diffusion_init, neutral_diffusion_end use MOM_neutral_diffusion, only : neutral_diffusion_CS use MOM_neutral_diffusion, only : neutral_diffusion_calc_coeffs, neutral_diffusion +use MOM_open_boundary, only : ocean_OBC_type, OBC_FLATHER_E +use MOM_open_boundary, only : OBC_FLATHER_W, OBC_FLATHER_N, OBC_FLATHER_S use MOM_tracer_registry, only : tracer_registry_type, tracer_type, MOM_tracer_chksum -use MOM_variables, only : ocean_OBC_type, thermo_var_ptrs, OBC_FLATHER_E -use MOM_variables, only : OBC_FLATHER_W, OBC_FLATHER_N, OBC_FLATHER_S +use MOM_variables, only : thermo_var_ptrs use MOM_verticalGrid, only : verticalGrid_type implicit none ; private diff --git a/src/tracer/advection_test_tracer.F90 b/src/tracer/advection_test_tracer.F90 index a490299e76..c5eae04fe2 100644 --- a/src/tracer/advection_test_tracer.F90 +++ b/src/tracer/advection_test_tracer.F90 @@ -62,13 +62,14 @@ module advection_test_tracer use MOM_grid, only : ocean_grid_type use MOM_hor_index, only : hor_index_type use MOM_io, only : file_exists, read_data, slasher, vardesc, var_desc, query_vardesc +use MOM_open_boundary, only : ocean_OBC_type use MOM_restart, only : register_restart_field, MOM_restart_CS use MOM_sponge, only : set_up_sponge_field, sponge_CS use MOM_time_manager, only : time_type, get_time use MOM_tracer_registry, only : register_tracer, tracer_registry_type use MOM_tracer_registry, only : add_tracer_diagnostics, add_tracer_OBC_values use MOM_tracer_registry, only : tracer_vertdiff -use MOM_variables, only : surface, ocean_OBC_type +use MOM_variables, only : surface use MOM_verticalGrid, only : verticalGrid_type use coupler_util, only : set_coupler_values, ind_csurf diff --git a/src/tracer/dye_example.F90 b/src/tracer/dye_example.F90 index 93925d6e3a..0f17aa9b01 100644 --- a/src/tracer/dye_example.F90 +++ b/src/tracer/dye_example.F90 @@ -63,6 +63,7 @@ module regional_dyes use MOM_grid, only : ocean_grid_type use MOM_hor_index, only : hor_index_type use MOM_io, only : file_exists, read_data, slasher, vardesc, var_desc, query_vardesc +use MOM_open_boundary, only : ocean_OBC_type use MOM_restart, only : register_restart_field, query_initialized, MOM_restart_CS use MOM_sponge, only : set_up_sponge_field, sponge_CS use MOM_time_manager, only : time_type, get_time @@ -70,7 +71,7 @@ module regional_dyes use MOM_tracer_registry, only : add_tracer_diagnostics, add_tracer_OBC_values use MOM_tracer_registry, only : tracer_vertdiff use MOM_tracer_Z_init, only : tracer_Z_init -use MOM_variables, only : surface, ocean_OBC_type +use MOM_variables, only : surface use MOM_verticalGrid, only : verticalGrid_type use coupler_util, only : set_coupler_values, ind_csurf diff --git a/src/tracer/ideal_age_example.F90 b/src/tracer/ideal_age_example.F90 index 9f7be83e04..04bfa4532d 100644 --- a/src/tracer/ideal_age_example.F90 +++ b/src/tracer/ideal_age_example.F90 @@ -63,6 +63,7 @@ module ideal_age_example use MOM_grid, only : ocean_grid_type use MOM_hor_index, only : hor_index_type use MOM_io, only : file_exists, read_data, slasher, vardesc, var_desc, query_vardesc +use MOM_open_boundary, only : ocean_OBC_type use MOM_restart, only : register_restart_field, query_initialized, MOM_restart_CS use MOM_sponge, only : set_up_sponge_field, sponge_CS use MOM_time_manager, only : time_type, get_time @@ -70,7 +71,7 @@ module ideal_age_example use MOM_tracer_registry, only : add_tracer_diagnostics, add_tracer_OBC_values use MOM_tracer_registry, only : tracer_vertdiff use MOM_tracer_Z_init, only : tracer_Z_init -use MOM_variables, only : surface, ocean_OBC_type +use MOM_variables, only : surface use MOM_verticalGrid, only : verticalGrid_type use coupler_util, only : set_coupler_values, ind_csurf diff --git a/src/tracer/oil_tracer.F90 b/src/tracer/oil_tracer.F90 index 72b90bd135..d2725cdb5d 100644 --- a/src/tracer/oil_tracer.F90 +++ b/src/tracer/oil_tracer.F90 @@ -63,6 +63,7 @@ module oil_tracer use MOM_grid, only : ocean_grid_type use MOM_hor_index, only : hor_index_type use MOM_io, only : file_exists, read_data, slasher, vardesc, var_desc, query_vardesc +use MOM_open_boundary, only : ocean_OBC_type use MOM_restart, only : register_restart_field, query_initialized, MOM_restart_CS use MOM_sponge, only : set_up_sponge_field, sponge_CS use MOM_time_manager, only : time_type, get_time @@ -70,7 +71,7 @@ module oil_tracer use MOM_tracer_registry, only : add_tracer_diagnostics, add_tracer_OBC_values use MOM_tracer_registry, only : tracer_vertdiff use MOM_tracer_Z_init, only : tracer_Z_init -use MOM_variables, only : surface, ocean_OBC_type +use MOM_variables, only : surface use MOM_variables, only : thermo_var_ptrs use MOM_verticalGrid, only : verticalGrid_type use coupler_util, only : set_coupler_values, ind_csurf diff --git a/src/tracer/tracer_example.F90 b/src/tracer/tracer_example.F90 index 3b63b32056..8b5218276e 100644 --- a/src/tracer/tracer_example.F90 +++ b/src/tracer/tracer_example.F90 @@ -59,12 +59,13 @@ module USER_tracer_example use MOM_grid, only : ocean_grid_type use MOM_hor_index, only : hor_index_type use MOM_io, only : file_exists, read_data, slasher, vardesc, var_desc, query_vardesc +use MOM_open_boundary, only : ocean_OBC_type use MOM_restart, only : register_restart_field, MOM_restart_CS use MOM_sponge, only : set_up_sponge_field, sponge_CS use MOM_time_manager, only : time_type, get_time use MOM_tracer_registry, only : register_tracer, tracer_registry_type use MOM_tracer_registry, only : add_tracer_diagnostics, add_tracer_OBC_values -use MOM_variables, only : surface, ocean_OBC_type +use MOM_variables, only : surface use MOM_verticalGrid, only : verticalGrid_type use coupler_util, only : set_coupler_values, ind_csurf diff --git a/src/user/DOME2d_initialization.F90 b/src/user/DOME2d_initialization.F90 index 0e96df8f28..fcf8367bcb 100644 --- a/src/user/DOME2d_initialization.F90 +++ b/src/user/DOME2d_initialization.F90 @@ -9,7 +9,7 @@ module DOME2d_initialization use MOM_io, only : open_file, read_data, read_axis_data, SINGLE_FILE use MOM_io, only : write_field, slasher, vardesc use MOM_sponge, only : sponge_CS, set_up_sponge_field, initialize_sponge -use MOM_variables, only : thermo_var_ptrs, ocean_OBC_type +use MOM_variables, only : thermo_var_ptrs use MOM_verticalGrid, only : verticalGrid_type use MOM_EOS, only : calculate_density, calculate_density_derivs, EOS_type use regrid_consts, only : coordinateMode, DEFAULT_COORDINATE_MODE diff --git a/src/user/DOME_initialization.F90 b/src/user/DOME_initialization.F90 index 62ce8b6913..b94fb69a18 100644 --- a/src/user/DOME_initialization.F90 +++ b/src/user/DOME_initialization.F90 @@ -24,8 +24,9 @@ module DOME_initialization use MOM_file_parser, only : get_param, log_version, param_file_type use MOM_get_input, only : directories use MOM_grid, only : ocean_grid_type +use MOM_open_boundary, only : ocean_OBC_type, OBC_NONE, OBC_SIMPLE use MOM_tracer_registry, only : tracer_registry_type, add_tracer_OBC_values -use MOM_variables, only : thermo_var_ptrs, ocean_OBC_type, OBC_NONE, OBC_SIMPLE +use MOM_variables, only : thermo_var_ptrs use MOM_verticalGrid, only : verticalGrid_type use MOM_EOS, only : calculate_density, calculate_density_derivs, EOS_type diff --git a/src/user/ISOMIP_initialization.F90 b/src/user/ISOMIP_initialization.F90 index 0328e70d2b..1a08d800f2 100644 --- a/src/user/ISOMIP_initialization.F90 +++ b/src/user/ISOMIP_initialization.F90 @@ -27,7 +27,7 @@ module ISOMIP_initialization use MOM_io, only : close_file, fieldtype, file_exists use MOM_io, only : open_file, read_data, read_axis_data, SINGLE_FILE use MOM_io, only : write_field, slasher, vardesc -use MOM_variables, only : thermo_var_ptrs, ocean_OBC_type +use MOM_variables, only : thermo_var_ptrs use MOM_verticalGrid, only : verticalGrid_type use MOM_EOS, only : calculate_density, calculate_density_derivs, EOS_type use regrid_consts, only : coordinateMode, DEFAULT_COORDINATE_MODE diff --git a/src/user/Phillips_initialization.F90 b/src/user/Phillips_initialization.F90 index 492fd2e8ee..ad176ae4d3 100644 --- a/src/user/Phillips_initialization.F90 +++ b/src/user/Phillips_initialization.F90 @@ -27,10 +27,8 @@ module Phillips_initialization use MOM_io, only : open_file, read_data, read_axis_data, SINGLE_FILE use MOM_io, only : write_field, slasher use MOM_sponge, only : set_up_sponge_field, initialize_sponge, sponge_CS -use MOM_tracer_registry, only : tracer_registry_type, add_tracer_OBC_values +use MOM_tracer_registry, only : tracer_registry_type use MOM_variables, only : thermo_var_ptrs -use MOM_variables, only : ocean_OBC_type, OBC_NONE, OBC_SIMPLE -use MOM_variables, only : OBC_FLATHER_E, OBC_FLATHER_W, OBC_FLATHER_N, OBC_FLATHER_S use MOM_verticalGrid, only : verticalGrid_type use MOM_EOS, only : calculate_density, calculate_density_derivs, EOS_type diff --git a/src/user/Rossby_front_2d_initialization.F90 b/src/user/Rossby_front_2d_initialization.F90 index dd55e8324a..149ff3db25 100644 --- a/src/user/Rossby_front_2d_initialization.F90 +++ b/src/user/Rossby_front_2d_initialization.F90 @@ -10,7 +10,7 @@ module Rossby_front_2d_initialization use MOM_io, only : close_file, fieldtype, file_exists use MOM_io, only : open_file, read_data, read_axis_data, SINGLE_FILE use MOM_io, only : write_field, slasher, vardesc -use MOM_variables, only : thermo_var_ptrs, ocean_OBC_type +use MOM_variables, only : thermo_var_ptrs use MOM_verticalGrid, only : verticalGrid_type use MOM_EOS, only : calculate_density, calculate_density_derivs, EOS_type use regrid_consts, only : coordinateMode, DEFAULT_COORDINATE_MODE diff --git a/src/user/adjustment_initialization.F90 b/src/user/adjustment_initialization.F90 index d8b2414df6..2831a5a47f 100644 --- a/src/user/adjustment_initialization.F90 +++ b/src/user/adjustment_initialization.F90 @@ -26,7 +26,7 @@ module adjustment_initialization use MOM_io, only : close_file, fieldtype, file_exists use MOM_io, only : open_file, read_data, read_axis_data, SINGLE_FILE use MOM_io, only : write_field, slasher -use MOM_variables, only : thermo_var_ptrs, ocean_OBC_type +use MOM_variables, only : thermo_var_ptrs use MOM_verticalGrid, only : verticalGrid_type use MOM_EOS, only : calculate_density, calculate_density_derivs, EOS_type use regrid_consts, only : coordinateMode, DEFAULT_COORDINATE_MODE diff --git a/src/user/benchmark_initialization.F90 b/src/user/benchmark_initialization.F90 index d003773f08..c39c9db0f4 100644 --- a/src/user/benchmark_initialization.F90 +++ b/src/user/benchmark_initialization.F90 @@ -24,9 +24,8 @@ module benchmark_initialization use MOM_file_parser, only : get_param, log_version, param_file_type use MOM_get_input, only : directories use MOM_grid, only : ocean_grid_type -use MOM_tracer_registry, only : tracer_registry_type, add_tracer_OBC_values +use MOM_tracer_registry, only : tracer_registry_type use MOM_variables, only : thermo_var_ptrs -use MOM_variables, only : ocean_OBC_type, OBC_NONE, OBC_SIMPLE use MOM_verticalGrid, only : verticalGrid_type use MOM_EOS, only : calculate_density, calculate_density_derivs, EOS_type diff --git a/src/user/circle_obcs_initialization.F90 b/src/user/circle_obcs_initialization.F90 index 1c1502eaff..80e326674f 100644 --- a/src/user/circle_obcs_initialization.F90 +++ b/src/user/circle_obcs_initialization.F90 @@ -24,8 +24,8 @@ module circle_obcs_initialization use MOM_file_parser, only : get_param, log_version, param_file_type use MOM_get_input, only : directories use MOM_grid, only : ocean_grid_type -use MOM_tracer_registry, only : tracer_registry_type, add_tracer_OBC_values -use MOM_variables, only : thermo_var_ptrs, ocean_OBC_type +use MOM_tracer_registry, only : tracer_registry_type +use MOM_variables, only : thermo_var_ptrs use MOM_verticalGrid, only : verticalGrid_type use MOM_EOS, only : calculate_density, calculate_density_derivs, EOS_type diff --git a/src/user/external_gwave_initialization.F90 b/src/user/external_gwave_initialization.F90 index 5ce6145a7a..cc1fe5f226 100644 --- a/src/user/external_gwave_initialization.F90 +++ b/src/user/external_gwave_initialization.F90 @@ -23,7 +23,7 @@ module external_gwave_initialization use MOM_file_parser, only : get_param, log_version, param_file_type use MOM_get_input, only : directories use MOM_grid, only : ocean_grid_type -use MOM_tracer_registry, only : tracer_registry_type, add_tracer_OBC_values +use MOM_tracer_registry, only : tracer_registry_type use MOM_variables, only : thermo_var_ptrs implicit none ; private diff --git a/src/user/lock_exchange_initialization.F90 b/src/user/lock_exchange_initialization.F90 index 222e45dc98..71822a84c2 100644 --- a/src/user/lock_exchange_initialization.F90 +++ b/src/user/lock_exchange_initialization.F90 @@ -23,7 +23,7 @@ module lock_exchange_initialization use MOM_file_parser, only : get_param, log_version, param_file_type use MOM_get_input, only : directories use MOM_grid, only : ocean_grid_type -use MOM_tracer_registry, only : tracer_registry_type, add_tracer_OBC_values +use MOM_tracer_registry, only : tracer_registry_type use MOM_variables, only : thermo_var_ptrs use MOM_verticalGrid, only : verticalGrid_type diff --git a/src/user/seamount_initialization.F90 b/src/user/seamount_initialization.F90 index 7cb9ba4612..e25d05c5c1 100644 --- a/src/user/seamount_initialization.F90 +++ b/src/user/seamount_initialization.F90 @@ -28,8 +28,8 @@ module seamount_initialization use MOM_io, only : open_file, read_data, read_axis_data, SINGLE_FILE use MOM_io, only : write_field, slasher, vardesc use MOM_sponge, only : set_up_sponge_field, initialize_sponge, sponge_CS -use MOM_tracer_registry, only : tracer_registry_type, add_tracer_OBC_values -use MOM_variables, only : thermo_var_ptrs, ocean_OBC_type +use MOM_tracer_registry, only : tracer_registry_type +use MOM_variables, only : thermo_var_ptrs use MOM_verticalGrid, only : verticalGrid_type use MOM_EOS, only : calculate_density, calculate_density_derivs, EOS_type use regrid_consts, only : coordinateMode, DEFAULT_COORDINATE_MODE diff --git a/src/user/sloshing_initialization.F90 b/src/user/sloshing_initialization.F90 index 791c1ddcd6..e0a48fa135 100644 --- a/src/user/sloshing_initialization.F90 +++ b/src/user/sloshing_initialization.F90 @@ -28,8 +28,8 @@ module sloshing_initialization use MOM_io, only : open_file, read_data, read_axis_data, SINGLE_FILE use MOM_io, only : write_field, slasher use MOM_sponge, only : set_up_sponge_field, initialize_sponge, sponge_CS -use MOM_tracer_registry, only : tracer_registry_type, add_tracer_OBC_values -use MOM_variables, only : thermo_var_ptrs, ocean_OBC_type +use MOM_tracer_registry, only : tracer_registry_type +use MOM_variables, only : thermo_var_ptrs use MOM_verticalGrid, only : verticalGrid_type use MOM_EOS, only : calculate_density, calculate_density_derivs, EOS_type diff --git a/src/user/user_initialization.F90 b/src/user/user_initialization.F90 index 3a01978e67..0364ef884c 100644 --- a/src/user/user_initialization.F90 +++ b/src/user/user_initialization.F90 @@ -26,10 +26,11 @@ module user_initialization use MOM_io, only : close_file, fieldtype, file_exists use MOM_io, only : open_file, read_data, read_axis_data, SINGLE_FILE use MOM_io, only : write_field, slasher +use MOM_open_boundary, only : ocean_OBC_type, OBC_NONE, OBC_SIMPLE +use MOM_open_boundary, only : OBC_FLATHER_E, OBC_FLATHER_W, OBC_FLATHER_N, OBC_FLATHER_S use MOM_sponge, only : set_up_sponge_field, initialize_sponge, sponge_CS use MOM_tracer_registry, only : tracer_registry_type, add_tracer_OBC_values -use MOM_variables, only : thermo_var_ptrs, ocean_OBC_type, OBC_NONE, OBC_SIMPLE -use MOM_variables, only : OBC_FLATHER_E, OBC_FLATHER_W, OBC_FLATHER_N, OBC_FLATHER_S +use MOM_variables, only : thermo_var_ptrs use MOM_verticalGrid, only : verticalGrid_type use MOM_EOS, only : calculate_density, calculate_density_derivs, EOS_type implicit none ; private