MOM6
|
Baropotric solver.
By Robert Hallberg, April 1994 - January 2007
This program contains the subroutines that time steps the linearized barotropic equations. btstep is used to actually time step the barotropic equations, and contains most of the substance of this module.
btstep uses a forwards-backwards based scheme to time step the barotropic equations, returning the layers' accelerations due to the barotropic changes in the ocean state, the final free surface height (or column mass), and the volume (or mass) fluxes summed through the layers and averaged over the baroclinic time step. As input, btstep takes the initial 3-D velocities, the inital free surface height, the 3-D accelerations of the layers, and the external forcing. Everything in btstep is cast in terms of anomalies, so if everything is in balance, there is explicitly no acceleration due to btstep.
The spatial discretization of the continuity equation is second order accurate. A flux conservative form is used to guarantee global conservation of volume. The spatial discretization of the momentum equation is second order accurate. The Coriolis force is written in a form which does not contribute to the energy tendency and which conserves linearized potential vorticity, f/D. These terms are exactly removed from the baroclinic momentum equations, so the linearization of vorticity advection will not degrade the overall solution.
btcalc calculates the fractional thickness of each layer at the velocity points, for later use in calculating the barotropic velocities and the averaged accelerations. Harmonic mean thicknesses (i.e. 2*h_L*h_R/(h_L + h_R)) are used to avoid overly strong weighting of overly thin layers. This may later be relaxed to use thicknesses determined from the continuity equations.
bt_mass_source determines the real mass sources for the barotropic solver, along with the corrective pseudo-fluxes that keep the barotropic and baroclinic estimates of the free surface height close to each other. Given the layer thicknesses and the free surface height that correspond to each other, it calculates a corrective mass source that is added to the barotropic continuity* equation, and optionally adjusts a slowly varying correction rate. Newer algorithmic changes have deemphasized the need for this, but it is still here to add net water sources to the barotropic solver.*
barotropic_init allocates and initializes any barotropic arrays that have not been read from a restart file, reads parameters from the inputfile, and sets up diagnostic fields.
barotropic_end deallocates anything allocated in barotropic_init or register_barotropic_restarts.
register_barotropic_restarts is used to indicate any fields that are private to the barotropic solver that need to be included in the restart files, and to ensure that they are read.
Data Types | |
type | barotropic_cs |
The barotropic stepping control stucture. More... | |
type | bt_obc_type |
The barotropic stepping open boundary condition type. More... | |
type | local_bt_cont_u_type |
A desciption of the functional dependence of transport at a u-point. More... | |
type | local_bt_cont_v_type |
A desciption of the functional dependence of transport at a v-point. More... | |
type | memory_size_type |
A container for passing around active tracer point memory limits. More... | |
integer | id_clock_sync =-1 |
CPU time clock IDs. More... | |
integer | id_clock_calc =-1 |
CPU time clock IDs. More... | |
integer | id_clock_calc_pre =-1 |
CPU time clock IDs. More... | |
integer | id_clock_calc_post =-1 |
CPU time clock IDs. More... | |
integer | id_clock_pass_step =-1 |
CPU time clock IDs. More... | |
integer | id_clock_pass_pre =-1 |
CPU time clock IDs. More... | |
integer | id_clock_pass_post =-1 |
CPU time clock IDs. More... | |
integer, parameter | harmonic = 1 |
Enumeration values for various schemes. More... | |
integer, parameter | arithmetic = 2 |
CPU time clock IDs. More... | |
integer, parameter | hybrid = 3 |
CPU time clock IDs. More... | |
integer, parameter | from_bt_cont = 4 |
CPU time clock IDs. More... | |
integer, parameter | hybrid_bt_cont = 5 |
CPU time clock IDs. More... | |
character *(20), parameter | hybrid_string = "HYBRID" |
CPU time clock IDs. More... | |
character *(20), parameter | harmonic_string = "HARMONIC" |
CPU time clock IDs. More... | |
character *(20), parameter | arithmetic_string = "ARITHMETIC" |
CPU time clock IDs. More... | |
character *(20), parameter | bt_cont_string = "FROM_BT_CONT" |
CPU time clock IDs. More... | |
subroutine, public | btstep (U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce, eta_PF_in, U_Cor, V_Cor, accel_layer_u, accel_layer_v, eta_out, uhbtav, vhbtav, G, GV, US, CS, visc_rem_u, visc_rem_v, etaav, OBC, BT_cont, eta_PF_start, taux_bot, tauy_bot, uh0, vh0, u_uh0, v_vh0) |
This subroutine time steps the barotropic equations explicitly. For gravity waves, anything between a forwards-backwards scheme and a simulated backwards Euler scheme is used, with bebt between 0.0 and 1.0 determining the scheme. In practice, bebt must be of order 0.2 or greater. A forwards-backwards treatment of the Coriolis terms is always used. More... | |
subroutine, public | set_dtbt (G, GV, US, CS, eta, pbce, BT_cont, gtot_est, SSH_add) |
This subroutine automatically determines an optimal value for dtbt based on some state of the ocean. More... | |
subroutine | apply_velocity_obcs (OBC, ubt, vbt, uhbt, vhbt, ubt_trans, vbt_trans, eta, ubt_old, vbt_old, BT_OBC, G, MS, US, halo, dtbt, bebt, use_BT_cont, Datu, Datv, BTCL_u, BTCL_v, uhbt0, vhbt0) |
The following 4 subroutines apply the open boundary conditions. This subroutine applies the open boundary conditions on barotropic velocities and mass transports, as developed by Mehmet Ilicak. More... | |
subroutine | set_up_bt_obc (OBC, eta, BT_OBC, BT_Domain, G, GV, US, MS, halo, use_BT_cont, Datu, Datv, BTCL_u, BTCL_v) |
This subroutine sets up the private structure used to apply the open boundary conditions, as developed by Mehmet Ilicak. More... | |
subroutine | destroy_bt_obc (BT_OBC) |
Clean up the BT_OBC memory. More... | |
subroutine, public | btcalc (h, G, GV, CS, h_u, h_v, may_use_default, OBC) |
btcalc calculates the barotropic velocities from the full velocity and thickness fields, determines the fraction of the total water column in each layer at velocity points, and determines a corrective fictitious mass source that will drive the barotropic estimate of the free surface height toward the baroclinic estimate. More... | |
real function | find_uhbt (u, BTC, US) |
The function find_uhbt determines the zonal transport for a given velocity. More... | |
real function | uhbt_to_ubt (uhbt, BTC, US, guess) |
This function inverts the transport function to determine the barotopic velocity that is consistent with a given transport. More... | |
real function | find_vhbt (v, BTC, US) |
The function find_vhbt determines the meridional transport for a given velocity. More... | |
real function | vhbt_to_vbt (vhbt, BTC, US, guess) |
This function inverts the transport function to determine the barotopic velocity that is consistent with a given transport. More... | |
subroutine | set_local_bt_cont_types (BT_cont, BTCL_u, BTCL_v, G, US, MS, BT_Domain, halo) |
This subroutine sets up reordered versions of the BT_cont type in the local_BT_cont types, which have wide halos properly filled in. More... | |
subroutine | adjust_local_bt_cont_types (ubt, uhbt, vbt, vhbt, BTCL_u, BTCL_v, G, US, MS, halo) |
Adjust_local_BT_cont_types sets up reordered versions of the BT_cont type in the local_BT_cont types, which have wide halos properly filled in. More... | |
subroutine | bt_cont_to_face_areas (BT_cont, Datu, Datv, G, US, MS, halo, maximize) |
This subroutine uses the BTCL types to find typical or maximum face areas, which can then be used for finding wave speeds, etc. More... | |
subroutine | swap (a, b) |
Swap the values of two real variables. More... | |
subroutine | find_face_areas (Datu, Datv, G, GV, US, CS, MS, eta, halo, add_max) |
This subroutine determines the open face areas of cells for calculating the barotropic transport. More... | |
subroutine, public | bt_mass_source (h, eta, set_cor, G, GV, CS) |
bt_mass_source determines the appropriately limited mass source for the barotropic solver, along with a corrective fictitious mass source that will drive the barotropic estimate of the free surface height toward the baroclinic estimate. More... | |
subroutine, public | barotropic_init (u, v, h, eta, Time, G, GV, US, param_file, diag, CS, restart_CS, calc_dtbt, BT_cont, tides_CSp) |
barotropic_init initializes a number of time-invariant fields used in the barotropic calculation and initializes any barotropic fields that have not already been initialized. More... | |
subroutine, public | barotropic_get_tav (CS, ubtav, vbtav, G, US) |
Copies ubtav and vbtav from private type into arrays. More... | |
subroutine, public | barotropic_end (CS) |
Clean up the barotropic control structure. More... | |
subroutine, public | register_barotropic_restarts (HI, GV, param_file, CS, restart_CS) |
This subroutine is used to register any fields from MOM_barotropic.F90 that should be written to or read from the restart file. More... | |
|
private |
Adjust_local_BT_cont_types sets up reordered versions of the BT_cont type in the local_BT_cont types, which have wide halos properly filled in.
[in] | ms | A type that describes the memory sizes of the argument arrays. |
[in] | ubt | The linearization zonal barotropic velocity [L T-1 ~> m s-1]. |
[in] | uhbt | The linearization zonal barotropic transport |
[in] | vbt | The linearization meridional barotropic velocity [L T-1 ~> m s-1]. |
[in] | vhbt | The linearization meridional barotropic transport |
[out] | btcl_u | A structure with the u information from BT_cont. |
[out] | btcl_v | A structure with the v information from BT_cont. |
[in] | g | The ocean's grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | halo | The extra halo size to use here. |
Definition at line 3398 of file MOM_barotropic.F90.
Referenced by btstep().
|
private |
The following 4 subroutines apply the open boundary conditions. This subroutine applies the open boundary conditions on barotropic velocities and mass transports, as developed by Mehmet Ilicak.
obc | An associated pointer to an OBC type. | |
[in,out] | g | The ocean's grid structure. |
[in] | ms | A type that describes the memory sizes of the argument arrays. |
[in,out] | ubt | the zonal barotropic velocity [L T-1 ~> m s-1]. |
[in,out] | uhbt | the zonal barotropic transport [H L2 T-1 ~> m3 s-1 or kg s-1]. |
[in,out] | ubt_trans | The zonal barotropic velocity used in transport [L T-1 ~> m s-1]. |
[in,out] | vbt | The meridional barotropic velocity [L T-1 ~> m s-1]. |
[in,out] | vhbt | the meridional barotropic transport [H L2 T-1 ~> m3 s-1 or kg s-1]. |
[in,out] | vbt_trans | the meridional BT velocity used in transports [L T-1 ~> m s-1]. |
[in] | eta | The barotropic free surface height anomaly or column mass anomaly [H ~> m or kg m-2]. |
[in] | ubt_old | The starting value of ubt in a barotropic step [L T-1 ~> m s-1]. |
[in] | vbt_old | The starting value of vbt in a barotropic step [L T-1 ~> m s-1]. |
[in] | bt_obc | A structure with the private barotropic arrays related to the open boundary conditions, set by set_up_BT_OBC. |
[in] | us | A dimensional unit scaling type |
[in] | halo | The extra halo size to use here. |
[in] | dtbt | The time step [T ~> s]. |
[in] | bebt | The fractional weighting of the future velocity in determining the transport. |
[in] | use_bt_cont | If true, use the BT_cont_types to calculate transports. |
[in] | datu | A fixed estimate of the face areas at u points [H L ~> m2 or kg m-1]. |
[in] | datv | A fixed estimate of the face areas at v points [H L ~> m2 or kg m-1]. |
[in] | btcl_u | Structure of information used for a dynamic estimate of the face areas at u-points. |
[in] | btcl_v | Structure of information used for a dynamic estimate of the face areas at v-points. |
[in] | uhbt0 | A correction to the zonal transport so that the barotropic functions agree with the sum of the layer transports [H L2 T-1 ~> m3 s-1 or kg s-1]. |
[in] | vhbt0 | A correction to the meridional transport so that the barotropic functions agree with the sum of the layer transports [H L2 T-1 ~> m3 s-1 or kg s-1]. |
Definition at line 2381 of file MOM_barotropic.F90.
References find_uhbt(), find_vhbt(), mom_open_boundary::obc_direction_n, and mom_open_boundary::obc_direction_s.
Referenced by btstep().
subroutine, public mom_barotropic::barotropic_end | ( | type(barotropic_cs), pointer | CS | ) |
Clean up the barotropic control structure.
cs | Control structure to clear out. |
Definition at line 4412 of file MOM_barotropic.F90.
References destroy_bt_obc().
subroutine, public mom_barotropic::barotropic_get_tav | ( | type(barotropic_cs), pointer | CS, |
real, dimension( g %isdb: g %iedb, g %jsd: g %jed), intent(inout) | ubtav, | ||
real, dimension( g %isd: g %ied, g %jsdb: g %jedb), intent(inout) | vbtav, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(unit_scale_type), intent(in) | US | ||
) |
Copies ubtav and vbtav from private type into arrays.
cs | Control structure for this module | |
[in] | g | Grid structure |
[in,out] | ubtav | Zonal barotropic velocity averaged over a baroclinic timestep [L T-1 ~> m s-1] |
[in,out] | vbtav | Meridional barotropic velocity averaged over a baroclinic timestep [L T-1 ~> m s-1] |
[in] | us | A dimensional unit scaling type |
Definition at line 4389 of file MOM_barotropic.F90.
Referenced by mom_hor_visc::horizontal_viscosity().
subroutine, public mom_barotropic::barotropic_init | ( | real, dimension(szib_(g),szj_(g),szk_(g)), intent(in) | u, |
real, dimension(szi_(g),szjb_(g),szk_(g)), intent(in) | v, | ||
real, dimension(szi_(g),szj_(g),szk_(g)), intent(in) | h, | ||
real, dimension(szi_(g),szj_(g)), intent(in) | eta, | ||
type(time_type), intent(in), target | Time, | ||
type(ocean_grid_type), intent(inout) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(param_file_type), intent(in) | param_file, | ||
type(diag_ctrl), intent(inout), target | diag, | ||
type(barotropic_cs), pointer | CS, | ||
type(mom_restart_cs), pointer | restart_CS, | ||
logical, intent(out) | calc_dtbt, | ||
type(bt_cont_type), optional, pointer | BT_cont, | ||
type(tidal_forcing_cs), optional, pointer | tides_CSp | ||
) |
barotropic_init initializes a number of time-invariant fields used in the barotropic calculation and initializes any barotropic fields that have not already been initialized.
[in,out] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | u | The zonal velocity [L T-1 ~> m s-1]. |
[in] | v | The meridional velocity [L T-1 ~> m s-1]. |
[in] | h | Layer thicknesses [H ~> m or kg m-2]. |
[in] | eta | Free surface height or column mass anomaly |
[in] | time | The current model time. |
[in] | param_file | A structure to parse for run-time parameters. |
[in,out] | diag | A structure that is used to regulate diagnostic output. |
cs | A pointer to the control structure for this module that is set in register_barotropic_restarts. | |
restart_cs | A pointer to the restart control structure. | |
[out] | calc_dtbt | If true, the barotropic time step must be recalculated before stepping. |
bt_cont | A structure with elements that describe the | |
tides_csp | A pointer to the control structure of the |
Definition at line 3704 of file MOM_barotropic.F90.
References mom_variables::alloc_bt_cont_type(), arithmetic, arithmetic_string, bt_cont_string, btcalc(), find_face_areas(), from_bt_cont, harmonic, harmonic_string, hybrid, hybrid_string, id_clock_calc, id_clock_calc_post, id_clock_calc_pre, id_clock_pass_post, id_clock_pass_pre, id_clock_pass_step, id_clock_sync, mom_error_handler::mom_error(), mom_error_handler::mom_mesg(), and set_dtbt().
|
private |
This subroutine uses the BTCL types to find typical or maximum face areas, which can then be used for finding wave speeds, etc.
[in,out] | bt_cont | The BT_cont_type input to the barotropic solver. |
[in] | ms | A type that describes the memory sizes of the argument arrays. |
[out] | datu | The effective zonal face area [H L ~> m2 or kg m-1]. |
[out] | datv | The effective meridional face area [H L ~> m2 or kg m-1]. |
[in] | g | The ocean's grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | halo | The extra halo size to use here. |
[in] | maximize | If present and true, find the maximum face area for any velocity. |
Definition at line 3493 of file MOM_barotropic.F90.
Referenced by btstep(), and set_dtbt().
subroutine, public mom_barotropic::bt_mass_source | ( | real, dimension(szi_(g),szj_(g),szk_(g)), intent(in) | h, |
real, dimension(szi_(g),szj_(g)), intent(in) | eta, | ||
logical, intent(in) | set_cor, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(barotropic_cs), pointer | CS | ||
) |
bt_mass_source determines the appropriately limited mass source for the barotropic solver, along with a corrective fictitious mass source that will drive the barotropic estimate of the free surface height toward the baroclinic estimate.
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | h | Layer thicknesses [H ~> m or kg m-2]. |
[in] | eta | The free surface height that is to be corrected [H ~> m or kg m-2]. |
[in] | set_cor | A flag to indicate whether to set the corrective fluxes (and update the slowly varying part of eta_cor) (.true.) or whether to incrementally update the corrective fluxes. |
cs | The control structure returned by a previous call to barotropic_init. |
Definition at line 3643 of file MOM_barotropic.F90.
References mom_error_handler::mom_error().
subroutine, public mom_barotropic::btcalc | ( | real, dimension(szi_(g),szj_(g),szk_(g)), intent(in) | h, |
type(ocean_grid_type), intent(inout) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(barotropic_cs), pointer | CS, | ||
real, dimension(szib_(g),szj_(g),szk_(g)), intent(in), optional | h_u, | ||
real, dimension(szi_(g),szjb_(g),szk_(g)), intent(in), optional | h_v, | ||
logical, intent(in), optional | may_use_default, | ||
type(ocean_obc_type), optional, pointer | OBC | ||
) |
btcalc calculates the barotropic velocities from the full velocity and thickness fields, determines the fraction of the total water column in each layer at velocity points, and determines a corrective fictitious mass source that will drive the barotropic estimate of the free surface height toward the baroclinic estimate.
[in,out] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | h | Layer thicknesses [H ~> m or kg m-2]. |
cs | The control structure returned by a previous call to barotropic_init. | |
[in] | h_u | The specified thicknesses at u-points [H ~> m or kg m-2]. |
[in] | h_v | The specified thicknesses at v-points [H ~> m or kg m-2]. |
[in] | may_use_default | An optional logical argument to indicate that the default velocity point thicknesses may be used for this particular calculation, even though the setting of CShvel_scheme would usually require that h_u and h_v be passed in. |
obc | Open boundary control structure. |
Definition at line 2762 of file MOM_barotropic.F90.
References arithmetic, harmonic, hybrid, mom_error_handler::mom_error(), mom_open_boundary::obc_direction_n, and mom_open_boundary::obc_direction_s.
Referenced by barotropic_init().
subroutine, public mom_barotropic::btstep | ( | real, dimension( g %isdb: g %iedb, g %jsd: g %jed, g %ke), intent(in) | U_in, |
real, dimension( g %isd: g %ied, g %jsdb: g %jedb, g %ke), intent(in) | V_in, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed), intent(in) | eta_in, | ||
real, intent(in) | dt, | ||
real, dimension( g %isdb: g %iedb, g %jsd: g %jed, g %ke), intent(in) | bc_accel_u, | ||
real, dimension( g %isd: g %ied, g %jsdb: g %jedb, g %ke), intent(in) | bc_accel_v, | ||
type(mech_forcing), intent(in) | forces, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(in) | pbce, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed), intent(in) | eta_PF_in, | ||
real, dimension( g %isdb: g %iedb, g %jsd: g %jed, g %ke), intent(in) | U_Cor, | ||
real, dimension( g %isd: g %ied, g %jsdb: g %jedb, g %ke), intent(in) | V_Cor, | ||
real, dimension( g %isdb: g %iedb, g %jsd: g %jed, g %ke), intent(out) | accel_layer_u, | ||
real, dimension( g %isd: g %ied, g %jsdb: g %jedb, g %ke), intent(out) | accel_layer_v, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed), intent(out) | eta_out, | ||
real, dimension( g %isdb: g %iedb, g %jsd: g %jed), intent(out) | uhbtav, | ||
real, dimension( g %isd: g %ied, g %jsdb: g %jedb), intent(out) | vhbtav, | ||
type(ocean_grid_type), intent(inout) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(barotropic_cs), pointer | CS, | ||
real, dimension( g %isdb: g %iedb, g %jsd: g %jed, g %ke), intent(in) | visc_rem_u, | ||
real, dimension(szi_(g),szjb_(g),szk_(g)), intent(in) | visc_rem_v, | ||
real, dimension(szi_(g),szj_(g)), intent(out), optional | etaav, | ||
type(ocean_obc_type), optional, pointer | OBC, | ||
type(bt_cont_type), optional, pointer | BT_cont, | ||
real, dimension(:,:), optional, pointer | eta_PF_start, | ||
real, dimension(:,:), optional, pointer | taux_bot, | ||
real, dimension(:,:), optional, pointer | tauy_bot, | ||
real, dimension(:,:,:), optional, pointer | uh0, | ||
real, dimension(:,:,:), optional, pointer | vh0, | ||
real, dimension(:,:,:), optional, pointer | u_uh0, | ||
real, dimension(:,:,:), optional, pointer | v_vh0 | ||
) |
This subroutine time steps the barotropic equations explicitly. For gravity waves, anything between a forwards-backwards scheme and a simulated backwards Euler scheme is used, with bebt between 0.0 and 1.0 determining the scheme. In practice, bebt must be of order 0.2 or greater. A forwards-backwards treatment of the Coriolis terms is always used.
[in,out] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | u_in | The initial (3-D) zonal velocity [L T-1 ~> m s-1]. |
[in] | v_in | The initial (3-D) meridional velocity [L T-1 ~> m s-1]. |
[in] | eta_in | The initial barotropic free surface height anomaly or column mass anomaly [H ~> m or kg m-2]. |
[in] | dt | The time increment to integrate over [T ~> s]. |
[in] | bc_accel_u | The zonal baroclinic accelerations, [L T-2 ~> m s-2]. |
[in] | bc_accel_v | The meridional baroclinic accelerations, [L T-2 ~> m s-2]. |
[in] | forces | A structure with the driving mechanical forces |
[in] | pbce | The baroclinic pressure anomaly in each layer due to free surface height anomalies [L2 H-1 T-2 ~> m s-2 or m4 kg-1 s-2]. |
[in] | eta_pf_in | The 2-D eta field (either SSH anomaly or column mass anomaly) that was used to calculate the input pressure gradient accelerations (or its final value if eta_PF_start is provided [H ~> m or kg m-2]. Note: eta_in, pbce, and eta_PF_in must have up-to-date values in the first point of their halos. |
[in] | u_cor | The (3-D) zonal velocities used to calculate the Coriolis terms in bc_accel_u [L T-1 ~> m s-1]. |
[in] | v_cor | The (3-D) meridional velocities used to calculate the Coriolis terms in bc_accel_u [L T-1 ~> m s-1]. |
[out] | accel_layer_u | The zonal acceleration of each layer due to the barotropic calculation [L T-2 ~> m s-2]. |
[out] | accel_layer_v | The meridional acceleration of each layer due to the barotropic calculation [L T-2 ~> m s-2]. |
[out] | eta_out | The final barotropic free surface height anomaly or column mass anomaly [H ~> m or kg m-2]. |
[out] | uhbtav | the barotropic zonal volume or mass fluxes averaged through the barotropic steps [H L2 T-1 ~> m3 or kg s-1]. |
[out] | vhbtav | the barotropic meridional volume or mass fluxes averaged through the barotropic steps [H L2 T-1 ~> m3 or kg s-1]. |
cs | The control structure returned by a previous call to barotropic_init. | |
[in] | visc_rem_u | Both the fraction of the momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step's worth of a barotropic acceleration that a layer experiences after viscosity is applied, in the zonal direction. Nondimensional between 0 (at the bottom) and 1 (far above the bottom). |
[in] | visc_rem_v | Ditto for meridional direction [nondim]. |
[out] | etaav | The free surface height or column mass averaged over the barotropic integration [H ~> m or kg m-2]. |
obc | The open boundary condition structure. | |
bt_cont | A structure with elements that describe the effective open face areas as a function of barotropic flow. | |
eta_pf_start | The eta field consistent with the pressure gradient at the start of the barotropic stepping [H ~> m or kg m-2]. | |
taux_bot | The zonal bottom frictional stress from ocean to the seafloor [R L Z T-2 ~> Pa]. | |
tauy_bot | The meridional bottom frictional stress from ocean to the seafloor [R L Z T-2 ~> Pa]. | |
uh0 | The zonal layer transports at reference velocities [H L2 T-1 ~> m3 s-1 or kg s-1]. | |
u_uh0 | The velocities used to calculate uh0 [L T-1 ~> m s-1] | |
vh0 | The zonal layer transports at reference velocities [H L2 T-1 ~> m3 s-1 or kg s-1]. | |
v_vh0 | The velocities used to calculate vh0 [L T-1 ~> m s-1] |
Definition at line 388 of file MOM_barotropic.F90.
References adjust_local_bt_cont_types(), apply_velocity_obcs(), bt_cont_to_face_areas(), mom_domains::complete_group_pass(), mom_diag_mediator::enable_averaging(), find_face_areas(), find_uhbt(), find_vhbt(), id_clock_calc, id_clock_calc_post, id_clock_calc_pre, id_clock_pass_post, id_clock_pass_pre, id_clock_pass_step, mom_error_handler::is_root_pe(), mom_error_handler::mom_error(), mom_error_handler::mom_mesg(), mom_open_boundary::obc_direction_n, mom_open_boundary::obc_direction_s, mom_time_manager::real_to_time(), set_local_bt_cont_types(), set_up_bt_obc(), mom_domains::start_group_pass(), swap(), and mom_tidal_forcing::tidal_forcing_sensitivity().
|
private |
Clean up the BT_OBC memory.
[in,out] | bt_obc | A structure with the private barotropic arrays related to the open boundary conditions, set by set_up_BT_OBC. |
Definition at line 2736 of file MOM_barotropic.F90.
Referenced by barotropic_end().
|
private |
This subroutine determines the open face areas of cells for calculating the barotropic transport.
[in] | ms | A type that describes the memory sizes of the argument arrays. |
[out] | datu | The open zonal face area [H L ~> m2 or kg m-1]. |
[out] | datv | The open meridional face area [H L ~> m2 or kg m-1]. |
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
cs | The control structure returned by a previous call to barotropic_init. | |
[in] | eta | The barotropic free surface height anomaly |
[in] | halo | The halo size to use, default = 1. |
[in] | add_max | A value to add to the maximum depth (used to overestimate the external wave speed) [Z ~> m]. |
Definition at line 3545 of file MOM_barotropic.F90.
Referenced by barotropic_init(), btstep(), and set_dtbt().
|
private |
The function find_uhbt determines the zonal transport for a given velocity.
[in] | u | The local zonal velocity [L T-1 ~> m s-1] |
[in] | btc | A structure containing various fields that allow the barotropic transports to be calculated consistently with the layers' continuity equations. |
[in] | us | A dimensional unit scaling type |
Definition at line 3031 of file MOM_barotropic.F90.
Referenced by apply_velocity_obcs(), and btstep().
|
private |
The function find_vhbt determines the meridional transport for a given velocity.
[in] | v | The local meridional velocity [L T-1 ~> m s-1] |
[in] | btc | A structure containing various fields that allow the barotropic transports to be calculated consistently with the layers' continuity equations. |
[in] | us | A dimensional unit scaling type |
Definition at line 3149 of file MOM_barotropic.F90.
Referenced by apply_velocity_obcs(), and btstep().
subroutine, public mom_barotropic::register_barotropic_restarts | ( | type(hor_index_type), intent(in) | HI, |
type(verticalgrid_type), intent(in) | GV, | ||
type(param_file_type), intent(in) | param_file, | ||
type(barotropic_cs), pointer | CS, | ||
type(mom_restart_cs), pointer | restart_CS | ||
) |
This subroutine is used to register any fields from MOM_barotropic.F90 that should be written to or read from the restart file.
[in] | hi | A horizontal index type structure. |
[in] | param_file | A structure to parse for run-time parameters. |
cs | A pointer that is set to point to the control structure for this module. | |
[in] | gv | The ocean's vertical grid structure. |
restart_cs | A pointer to the restart control structure. |
Definition at line 4430 of file MOM_barotropic.F90.
References mom_error_handler::mom_error(), and mom_io::var_desc().
Referenced by mom_dynamics_split_rk2::register_restarts_dyn_split_rk2().
subroutine, public mom_barotropic::set_dtbt | ( | type(ocean_grid_type), intent(inout) | G, |
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(barotropic_cs), pointer | CS, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed), intent(in), optional | eta, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(in), optional | pbce, | ||
type(bt_cont_type), optional, pointer | BT_cont, | ||
real, intent(in), optional | gtot_est, | ||
real, intent(in), optional | SSH_add | ||
) |
This subroutine automatically determines an optimal value for dtbt based on some state of the ocean.
[in,out] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
cs | Barotropic control structure. | |
[in] | eta | The barotropic free surface height anomaly or column mass anomaly [H ~> m or kg m-2]. |
[in] | pbce | The baroclinic pressure anomaly in each layer due to free surface height anomalies [L2 H-1 T-2 ~> m s-2 or m4 kg-1 s-2]. |
bt_cont | A structure with elements that describe the effective open face areas as a function of barotropic flow. | |
[in] | gtot_est | An estimate of the total gravitational acceleration [L2 Z-1 T-2 ~> m s-2]. |
[in] | ssh_add | An additional contribution to SSH to provide a margin of error when calculating the external wave speed [Z ~> m]. |
Definition at line 2259 of file MOM_barotropic.F90.
References bt_cont_to_face_areas(), find_face_areas(), id_clock_sync, mom_error_handler::mom_error(), and mom_tidal_forcing::tidal_forcing_sensitivity().
Referenced by barotropic_init(), and mom_dynamics_split_rk2::step_mom_dyn_split_rk2().
|
private |
This subroutine sets up reordered versions of the BT_cont type in the local_BT_cont types, which have wide halos properly filled in.
[in,out] | bt_cont | The BT_cont_type input to the barotropic solver. |
[in] | ms | A type that describes the memory sizes of the argument arrays. |
[out] | btcl_u | A structure with the u information from BT_cont. |
[out] | btcl_v | A structure with the v information from BT_cont. |
[in] | g | The ocean's grid structure. |
[in] | us | A dimensional unit scaling type |
[in,out] | bt_domain | The domain to use for updating the halos of wide arrays. |
[in] | halo | The extra halo size to use here. |
Definition at line 3267 of file MOM_barotropic.F90.
References id_clock_calc_pre, id_clock_pass_pre, and swap().
Referenced by btstep().
|
private |
This subroutine sets up the private structure used to apply the open boundary conditions, as developed by Mehmet Ilicak.
obc | An associated pointer to an OBC type. | |
[in] | ms | A type that describes the memory sizes of the argument arrays. |
[in] | eta | The barotropic free surface height anomaly or column mass anomaly [H ~> m or kg m-2]. |
[in,out] | bt_obc | A structure with the private barotropic arrays related to the open boundary conditions, set by set_up_BT_OBC. |
[in,out] | bt_domain | MOM_domain_type associated with wide arrays |
[in,out] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | halo | The extra halo size to use here. |
[in] | use_bt_cont | If true, use the BT_cont_types to calculate transports. |
[in] | datu | A fixed estimate of the face areas at u points [H L ~> m2 or kg m-1]. |
[in] | datv | A fixed estimate of the face areas at v points [H L ~> m2 or kg m-1]. |
[in] | btcl_u | Structure of information used for a dynamic estimate of the face areas at u-points. |
[in] | btcl_v | Structure of information used for a dynamic estimate of the face areas at v-points. |
Definition at line 2557 of file MOM_barotropic.F90.
References mom_error_handler::mom_error(), mom_open_boundary::obc_direction_n, mom_open_boundary::obc_direction_s, uhbt_to_ubt(), and vhbt_to_vbt().
Referenced by btstep().
|
private |
Swap the values of two real variables.
[in,out] | a | The first variable to be swapped. |
[in,out] | b | The second variable to be swapped. |
Definition at line 3536 of file MOM_barotropic.F90.
Referenced by btstep(), and set_local_bt_cont_types().
|
private |
This function inverts the transport function to determine the barotopic velocity that is consistent with a given transport.
[in] | uhbt | The barotropic zonal transport that should be inverted for, [H L2 T-1 ~> m3 s-1 or kg s-1]. |
[in] | btc | A structure containing various fields that allow the barotropic transports to be calculated consistently with the layers' continuity equations. |
[in] | us | A dimensional unit scaling type |
[in] | guess | A guess at what ubt will be [L T-1 ~> m s-1]. The result is not allowed to be dramatically larger than guess. |
Definition at line 3056 of file MOM_barotropic.F90.
Referenced by set_up_bt_obc().
|
private |
This function inverts the transport function to determine the barotopic velocity that is consistent with a given transport.
[in] | vhbt | The barotropic meridional transport that should be inverted for [H L2 T-1 ~> m3 s-1 or kg s-1]. |
[in] | btc | A structure containing various fields that allow the barotropic transports to be calculated consistently with the layers' continuity equations. |
[in] | us | A dimensional unit scaling type |
[in] | guess | A guess at what vbt will be. The result is not allowed to be dramatically larger than guess [L T-1 ~> m s-1]. |
Definition at line 3173 of file MOM_barotropic.F90.
Referenced by set_up_bt_obc().
|
private |
CPU time clock IDs.
Definition at line 365 of file MOM_barotropic.F90.
Referenced by barotropic_init(), and btcalc().
|
private |
CPU time clock IDs.
Definition at line 371 of file MOM_barotropic.F90.
Referenced by barotropic_init().
|
private |
CPU time clock IDs.
Definition at line 372 of file MOM_barotropic.F90.
Referenced by barotropic_init().
|
private |
CPU time clock IDs.
Definition at line 367 of file MOM_barotropic.F90.
Referenced by barotropic_init().
|
private |
Enumeration values for various schemes.
Definition at line 364 of file MOM_barotropic.F90.
Referenced by barotropic_init(), and btcalc().
|
private |
CPU time clock IDs.
Definition at line 370 of file MOM_barotropic.F90.
Referenced by barotropic_init().
|
private |
CPU time clock IDs.
Definition at line 366 of file MOM_barotropic.F90.
Referenced by barotropic_init(), and btcalc().
|
private |
CPU time clock IDs.
Definition at line 368 of file MOM_barotropic.F90.
|
private |
CPU time clock IDs.
Definition at line 369 of file MOM_barotropic.F90.
Referenced by barotropic_init().
|
private |
CPU time clock IDs.
Definition at line 358 of file MOM_barotropic.F90.
Referenced by barotropic_init(), and btstep().
|
private |
CPU time clock IDs.
Definition at line 359 of file MOM_barotropic.F90.
Referenced by barotropic_init(), and btstep().
|
private |
CPU time clock IDs.
Definition at line 359 of file MOM_barotropic.F90.
Referenced by barotropic_init(), btstep(), and set_local_bt_cont_types().
|
private |
CPU time clock IDs.
Definition at line 360 of file MOM_barotropic.F90.
Referenced by barotropic_init(), and btstep().
|
private |
CPU time clock IDs.
Definition at line 360 of file MOM_barotropic.F90.
Referenced by barotropic_init(), btstep(), and set_local_bt_cont_types().
|
private |
CPU time clock IDs.
Definition at line 360 of file MOM_barotropic.F90.
Referenced by barotropic_init(), and btstep().
|
private |
CPU time clock IDs.
Definition at line 358 of file MOM_barotropic.F90.
Referenced by barotropic_init(), and set_dtbt().