@@ -694,6 +694,9 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
694694 integer :: ioff, joff
695695 integer :: l_seg
696696
697+ if (.not. CS% module_is_initialized) call MOM_error(FATAL, &
698+ " btstep: Module MOM_barotropic must be initialized before it is used." )
699+
697700 if (.not. CS% split) return
698701 is = G% isc ; ie = G% iec ; js = G% jsc ; je = G% jec ; nz = GV% ke
699702 Isq = G% IscB ; Ieq = G% IecB ; Jsq = G% JscB ; Jeq = G% JecB
@@ -2764,6 +2767,9 @@ subroutine set_dtbt(G, GV, US, CS, eta, pbce, BT_cont, gtot_est, SSH_add)
27642767 character (len= 200 ) :: mesg
27652768 integer :: i, j, k, is, ie, js, je, nz
27662769
2770+ if (.not. CS% module_is_initialized) call MOM_error(FATAL, &
2771+ " set_dtbt: Module MOM_barotropic must be initialized before it is used." )
2772+
27672773 if (.not. CS% split) return
27682774 is = G% isc ; ie = G% iec ; js = G% jsc ; je = G% jec ; nz = GV% ke
27692775 MS% isdw = G% isd ; MS% iedw = G% ied ; MS% jsdw = G% jsd ; MS% jedw = G% jed
@@ -3298,6 +3304,9 @@ subroutine btcalc(h, G, GV, CS, h_u, h_v, may_use_default, OBC)
32983304
32993305! This section interpolates thicknesses onto u & v grid points with the
33003306! second order accurate estimate h = 2*(h+ * h-)/(h+ + h-).
3307+ if (.not. CS% module_is_initialized) call MOM_error(FATAL, &
3308+ " btcalc: Module MOM_barotropic must be initialized before it is used." )
3309+
33013310 if (.not. CS% split) return
33023311
33033312 use_default = .false.
@@ -4186,6 +4195,9 @@ subroutine bt_mass_source(h, eta, set_cor, G, GV, CS)
41864195 ! thicknesses [H ~> m or kg m-2].
41874196 integer :: is, ie, js, je, nz, i, j, k
41884197
4198+ if (.not. CS% module_is_initialized) call MOM_error(FATAL, " bt_mass_source: " // &
4199+ " Module MOM_barotropic must be initialized before it is used." )
4200+
41894201 if (.not. CS% split) return
41904202
41914203 is = G% isc ; ie = G% iec ; js = G% jsc ; je = G% jec ; nz = GV% ke
0 commit comments