23 implicit none ;
private
25 #include <MOM_memory.h>
42 type(time_type),
pointer :: time
45 logical :: usemasswghtinterp
46 logical :: boundary_extrap
49 logical :: reconstruct
54 integer :: recon_scheme
58 integer :: id_e_tidal = -1
66 subroutine pressureforce_afv(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm, pbce, eta)
70 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)),
intent(in) :: h
72 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)),
intent(out) :: pfu
73 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)),
intent(out) :: pfv
75 type(
ale_cs),
pointer :: ale_csp
76 real,
dimension(:,:),
optional,
pointer :: p_atm
78 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)),
optional,
intent(out) :: pbce
81 real,
dimension(SZI_(G),SZJ_(G)),
optional,
intent(out) :: eta
85 if (gv%Boussinesq)
then
86 call pressureforce_afv_bouss(h, tv, pfu, pfv, g, gv, us, cs, ale_csp, p_atm, pbce, eta)
88 call pressureforce_afv_nonbouss(h, tv, pfu, pfv, g, gv, us, cs, ale_csp, p_atm, pbce, eta)
102 subroutine pressureforce_afv_nonbouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm, pbce, eta)
106 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)),
intent(in) :: h
108 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)),
intent(out) :: pfu
109 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)),
intent(out) :: pfv
111 type(
ale_cs),
pointer :: ale_csp
112 real,
dimension(:,:),
optional,
pointer :: p_atm
114 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)),
optional,
intent(out) :: pbce
117 real,
dimension(SZI_(G),SZJ_(G)),
optional,
intent(out) :: eta
121 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)+1) :: p
122 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)),
target :: &
127 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)) :: &
132 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)) :: &
137 real,
dimension(SZI_(G),SZJ_(G)) :: &
147 real,
dimension(SZI_(G)) :: rho_cv_bl
149 real,
dimension(SZIB_(G),SZJ_(G)) :: &
152 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)) :: &
154 real,
dimension(SZI_(G),SZJB_(G)) :: &
157 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)) :: &
159 real :: p_ref(szi_(g))
176 real :: rho_in_situ(szi_(g))
179 real,
parameter :: c1_6 = 1.0/6.0
180 integer :: is, ie, js, je, isq, ieq, jsq, jeq, nz, nkmb
183 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
184 nkmb=gv%nk_rho_varies
185 isq = g%IscB ; ieq = g%IecB ; jsq = g%JscB ; jeq = g%JecB
187 if (.not.
associated(cs))
call mom_error(fatal, &
188 "MOM_PressureForce_AFV_nonBouss: Module must be initialized before it is used.")
191 if (
present(p_atm))
then ;
if (
associated(p_atm)) use_p_atm = .true. ;
endif
192 use_eos =
associated(tv%eqn_of_state)
194 if (
associated(ale_csp)) use_ale = cs%reconstruct .and. use_eos
196 dp_neglect = gv%H_to_Pa * gv%H_subroundoff
197 alpha_ref = 1.0/cs%Rho0
198 g_earth_z = us%L_T_to_m_s**2 * gv%g_Earth
199 i_gearth = 1.0 / g_earth_z
203 do j=jsq,jeq+1 ;
do i=isq,ieq+1
204 p(i,j,1) = p_atm(i,j)
208 do j=jsq,jeq+1 ;
do i=isq,ieq+1
213 do j=jsq,jeq+1 ;
do k=2,nz+1 ;
do i=isq,ieq+1
214 p(i,j,k) = p(i,j,k-1) + gv%H_to_Pa * h(i,j,k-1)
215 enddo ;
enddo ;
enddo
223 tv_tmp%T => t_tmp ; tv_tmp%S => s_tmp
224 tv_tmp%eqn_of_state => tv%eqn_of_state
225 do i=isq,ieq+1 ; p_ref(i) = tv%P_Ref ;
enddo
228 do k=1,nkmb ;
do i=isq,ieq+1
229 tv_tmp%T(i,j,k) = tv%T(i,j,k) ; tv_tmp%S(i,j,k) = tv%S(i,j,k)
232 rho_cv_bl(:), isq, ieq-isq+2, tv%eqn_of_state, scale=us%kg_m3_to_R)
233 do k=nkmb+1,nz ;
do i=isq,ieq+1
234 if (gv%Rlay(k) < rho_cv_bl(i))
then
235 tv_tmp%T(i,j,k) = tv%T(i,j,nkmb) ; tv_tmp%S(i,j,k) = tv%S(i,j,nkmb)
237 tv_tmp%T(i,j,k) = tv%T(i,j,k) ; tv_tmp%S(i,j,k) = tv%S(i,j,k)
242 tv_tmp%T => tv%T ; tv_tmp%S => tv%S
243 tv_tmp%eqn_of_state => tv%eqn_of_state
252 if ( cs%Recon_Scheme == 1 )
then
254 elseif ( cs%Recon_Scheme == 2)
then
265 if ( cs%Recon_Scheme == 1 )
then
266 call int_spec_vol_dp_generic_plm( t_t(:,:,k), t_b(:,:,k), &
267 s_t(:,:,k), s_b(:,:,k), p(:,:,k), p(:,:,k+1), &
268 alpha_ref, dp_neglect, p(:,:,nz+1), g%HI, &
269 tv%eqn_of_state, dza(:,:,k), intp_dza(:,:,k), &
270 intx_dza(:,:,k), inty_dza(:,:,k), &
271 usemasswghtinterp = cs%useMassWghtInterp)
273 elseif ( cs%Recon_Scheme == 2 )
then
274 call mom_error(fatal,
"PressureForce_AFV_nonBouss: "//&
275 "int_spec_vol_dp_generic_ppm does not exist yet.")
282 call int_specific_vol_dp(tv_tmp%T(:,:,k), tv_tmp%S(:,:,k), p(:,:,k), &
283 p(:,:,k+1), alpha_ref, g%HI, tv%eqn_of_state, &
284 dza(:,:,k), intp_dza(:,:,k), intx_dza(:,:,k), &
285 inty_dza(:,:,k), bathyp=p(:,:,nz+1), dp_tiny=dp_neglect, &
286 usemasswghtinterp = cs%useMassWghtInterp)
289 alpha_anom = 1.0/(us%R_to_kg_m3*gv%Rlay(k)) - alpha_ref
290 do j=jsq,jeq+1 ;
do i=isq,ieq+1
291 dp(i,j) = gv%H_to_Pa * h(i,j,k)
292 dza(i,j,k) = alpha_anom * dp(i,j)
293 intp_dza(i,j,k) = 0.5 * alpha_anom * dp(i,j)**2
295 do j=js,je ;
do i=isq,ieq
296 intx_dza(i,j,k) = 0.5 * alpha_anom * (dp(i,j)+dp(i+1,j))
298 do j=jsq,jeq ;
do i=is,ie
299 inty_dza(i,j,k) = 0.5 * alpha_anom * (dp(i,j)+dp(i,j+1))
315 za(i,j) = alpha_ref*p(i,j,nz+1) - g_earth_z*g%bathyT(i,j)
317 do k=nz,1,-1 ;
do i=isq,ieq+1
318 za(i,j) = za(i,j) + dza(i,j,k)
325 do j=jsq,jeq+1 ;
do i=isq,ieq+1
326 ssh(i,j) = (za(i,j) - alpha_ref*p(i,j,1)) * i_gearth
330 do j=jsq,jeq+1 ;
do i=isq,ieq+1
331 za(i,j) = za(i,j) - g_earth_z * e_tidal(i,j)
335 if (cs%GFS_scale < 1.0)
then
341 rho_in_situ, isq, ieq-isq+2, tv%eqn_of_state)
344 dm(i,j) = (cs%GFS_scale - 1.0) * us%m_s_to_L_T**2 * &
345 (p(i,j,1)*(1.0/rho_in_situ(i) - alpha_ref) + za(i,j))
350 do j=jsq,jeq+1 ;
do i=isq,ieq+1
351 dm(i,j) = (cs%GFS_scale - 1.0) * us%m_s_to_L_T**2 * &
352 (p(i,j,1)*(1.0/(us%R_to_kg_m3*gv%Rlay(1)) - alpha_ref) + za(i,j))
365 do j=js,je ;
do i=isq,ieq
366 intx_za(i,j) = 0.5*(za(i,j) + za(i+1,j))
369 do j=jsq,jeq ;
do i=is,ie
370 inty_za(i,j) = 0.5*(za(i,j) + za(i,j+1))
376 do j=jsq,jeq+1 ;
do i=isq,ieq+1
377 dp(i,j) = gv%H_to_Pa*h(i,j,k)
378 za(i,j) = za(i,j) - dza(i,j,k)
381 do j=js,je ;
do i=isq,ieq
382 intx_za(i,j) = intx_za(i,j) - intx_dza(i,j,k)
383 pfu(i,j,k) = (((za(i,j)*dp(i,j) + intp_dza(i,j,k)) - &
384 (za(i+1,j)*dp(i+1,j) + intp_dza(i+1,j,k))) + &
385 ((dp(i+1,j) - dp(i,j)) * intx_za(i,j) - &
386 (p(i+1,j,k) - p(i,j,k)) * intx_dza(i,j,k))) * &
387 (us%m_s_to_L_T**2 * 2.0*g%IdxCu(i,j) / &
388 ((dp(i,j) + dp(i+1,j)) + dp_neglect))
391 do j=jsq,jeq ;
do i=is,ie
392 inty_za(i,j) = inty_za(i,j) - inty_dza(i,j,k)
393 pfv(i,j,k) = (((za(i,j)*dp(i,j) + intp_dza(i,j,k)) - &
394 (za(i,j+1)*dp(i,j+1) + intp_dza(i,j+1,k))) + &
395 ((dp(i,j+1) - dp(i,j)) * inty_za(i,j) - &
396 (p(i,j+1,k) - p(i,j,k)) * inty_dza(i,j,k))) * &
397 (us%m_s_to_L_T**2 * 2.0*g%IdyCv(i,j) / &
398 ((dp(i,j) + dp(i,j+1)) + dp_neglect))
401 if (cs%GFS_scale < 1.0)
then
404 do j=js,je ;
do i=isq,ieq
405 pfu(i,j,k) = pfu(i,j,k) - (dm(i+1,j) - dm(i,j)) * g%IdxCu(i,j)
408 do j=jsq,jeq ;
do i=is,ie
409 pfv(i,j,k) = pfv(i,j,k) - (dm(i,j+1) - dm(i,j)) * g%IdyCv(i,j)
414 if (
present(pbce))
then
418 if (
present(eta))
then
419 pa_to_h = 1.0 / gv%H_to_Pa
422 do j=jsq,jeq+1 ;
do i=isq,ieq+1
423 eta(i,j) = (p(i,j,nz+1) - p_atm(i,j))*pa_to_h
427 do j=jsq,jeq+1 ;
do i=isq,ieq+1
428 eta(i,j) = p(i,j,nz+1)*pa_to_h
433 if (cs%id_e_tidal>0)
call post_data(cs%id_e_tidal, e_tidal, cs%diag)
445 subroutine pressureforce_afv_bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm, pbce, eta)
449 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)),
intent(in) :: h
451 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)),
intent(out) :: pfu
452 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)),
intent(out) :: pfv
454 type(
ale_cs),
pointer :: ale_csp
455 real,
dimension(:,:),
optional,
pointer :: p_atm
457 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)),
optional,
intent(out) :: pbce
460 real,
dimension(SZI_(G),SZJ_(G)),
optional,
intent(out) :: eta
464 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)+1) :: e
465 real,
dimension(SZI_(G),SZJ_(G)) :: &
470 real,
dimension(SZI_(G)) :: &
473 real,
dimension(SZI_(G),SZJ_(G)) :: &
482 real,
dimension(SZIB_(G),SZJ_(G)) :: &
486 real,
dimension(SZI_(G),SZJB_(G)) :: &
491 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)),
target :: &
496 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)) :: &
499 real :: rho_in_situ(szi_(g))
500 real :: p_ref(szi_(g))
505 real :: g_earth_mks_z
506 real :: g_earth_z_geo
517 real,
parameter :: c1_6 = 1.0/6.0
518 integer :: is, ie, js, je, isq, ieq, jsq, jeq, nz, nkmb
521 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
522 nkmb=gv%nk_rho_varies
523 isq = g%IscB ; ieq = g%IecB ; jsq = g%JscB ; jeq = g%JecB
525 if (.not.
associated(cs))
call mom_error(fatal, &
526 "MOM_PressureForce_AFV_Bouss: Module must be initialized before it is used.")
529 if (
present(p_atm))
then ;
if (
associated(p_atm)) use_p_atm = .true. ;
endif
530 use_eos =
associated(tv%eqn_of_state)
531 do i=isq,ieq+1 ; p0(i) = 0.0 ;
enddo
533 if (
associated(ale_csp)) use_ale = cs%reconstruct .and. use_eos
535 h_neglect = gv%H_subroundoff
536 dz_neglect = gv%H_subroundoff * gv%H_to_Z
537 i_rho0 = us%m_s_to_L_T**2 / (us%R_to_kg_m3*gv%Rho0)
538 g_earth_mks_z = us%L_T_to_m_s**2 * gv%g_Earth
539 g_earth_z_geo = us%R_to_kg_m3*us%L_T_to_m_s**2 * gv%g_Earth
540 g_rho0 = gv%g_Earth / gv%Rho0
541 rho_ref_mks = cs%Rho0
542 rho_ref = rho_ref_mks*us%kg_m3_to_R
552 e(i,j,1) = -g%bathyT(i,j)
554 do k=1,nz ;
do i=isq,ieq+1
555 e(i,j,1) = e(i,j,1) + h(i,j,k)*gv%H_to_Z
558 call calc_tidal_forcing(cs%Time, e(:,:,1), e_tidal, g, cs%tides_CSp, m_to_z=us%m_to_Z)
564 do j=jsq,jeq+1 ;
do i=isq,ieq+1
565 e(i,j,nz+1) = -(g%bathyT(i,j) + e_tidal(i,j))
569 do j=jsq,jeq+1 ;
do i=isq,ieq+1
570 e(i,j,nz+1) = -g%bathyT(i,j)
574 do j=jsq,jeq+1;
do k=nz,1,-1 ;
do i=isq,ieq+1
575 e(i,j,k) = e(i,j,k+1) + h(i,j,k)*gv%H_to_Z
576 enddo ;
enddo ;
enddo
585 tv_tmp%T => t_tmp ; tv_tmp%S => s_tmp
586 tv_tmp%eqn_of_state => tv%eqn_of_state
588 do i=isq,ieq+1 ; p_ref(i) = tv%P_Ref ;
enddo
591 do k=1,nkmb ;
do i=isq,ieq+1
592 tv_tmp%T(i,j,k) = tv%T(i,j,k) ; tv_tmp%S(i,j,k) = tv%S(i,j,k)
595 rho_cv_bl(:), isq, ieq-isq+2, tv%eqn_of_state, scale=us%kg_m3_to_R)
597 do k=nkmb+1,nz ;
do i=isq,ieq+1
598 if (gv%Rlay(k) < rho_cv_bl(i))
then
599 tv_tmp%T(i,j,k) = tv%T(i,j,nkmb) ; tv_tmp%S(i,j,k) = tv%S(i,j,nkmb)
601 tv_tmp%T(i,j,k) = tv%T(i,j,k) ; tv_tmp%S(i,j,k) = tv%S(i,j,k)
606 tv_tmp%T => tv%T ; tv_tmp%S => tv%S
607 tv_tmp%eqn_of_state => tv%eqn_of_state
611 if (cs%GFS_scale < 1.0)
then
617 call calculate_density(tv_tmp%T(:,j,1), tv_tmp%S(:,j,1), p_atm(:,j), rho_in_situ, &
618 isq, ieq-isq+2, tv%eqn_of_state, scale=us%kg_m3_to_R)
621 isq, ieq-isq+2, tv%eqn_of_state, scale=us%kg_m3_to_R)
624 dm(i,j) = (cs%GFS_scale - 1.0) * (g_rho0 * rho_in_situ(i)) * e(i,j,1)
629 do j=jsq,jeq+1 ;
do i=isq,ieq+1
630 dm(i,j) = (cs%GFS_scale - 1.0) * (g_rho0 * gv%Rlay(1)) * e(i,j,1)
641 if ( cs%Recon_Scheme == 1 )
then
643 elseif ( cs%Recon_Scheme == 2 )
then
653 do j=jsq,jeq+1 ;
do i=isq,ieq+1
654 pa(i,j) = (rho_ref*g_earth_z_geo)*e(i,j,1) + p_atm(i,j)
658 do j=jsq,jeq+1 ;
do i=isq,ieq+1
659 pa(i,j) = (rho_ref*g_earth_z_geo)*e(i,j,1)
663 do j=js,je ;
do i=isq,ieq
664 intx_pa(i,j) = 0.5*(pa(i,j) + pa(i+1,j))
667 do j=jsq,jeq ;
do i=is,ie
668 inty_pa(i,j) = 0.5*(pa(i,j) + pa(i,j+1))
682 if ( cs%Recon_Scheme == 1 )
then
683 call int_density_dz_generic_plm( t_t(:,:,k), t_b(:,:,k), &
684 s_t(:,:,k), s_b(:,:,k), e(:,:,k), e(:,:,k+1), &
685 rho_ref_mks, cs%Rho0, g_earth_mks_z, &
686 dz_neglect, g%bathyT, g%HI, g%HI, &
687 tv%eqn_of_state, dpa, intz_dpa, intx_dpa, inty_dpa, &
688 usemasswghtinterp = cs%useMassWghtInterp)
689 elseif ( cs%Recon_Scheme == 2 )
then
690 call int_density_dz_generic_ppm( tv%T(:,:,k), t_t(:,:,k), t_b(:,:,k), &
691 tv%S(:,:,k), s_t(:,:,k), s_b(:,:,k), e(:,:,k), e(:,:,k+1), &
692 rho_ref_mks, cs%Rho0, g_earth_mks_z, &
693 g%HI, g%HI, tv%eqn_of_state, dpa, intz_dpa, &
697 call int_density_dz(tv_tmp%T(:,:,k), tv_tmp%S(:,:,k), e(:,:,k), e(:,:,k+1), &
698 rho_ref_mks, cs%Rho0, g_earth_mks_z, g%HI, g%HI, tv%eqn_of_state, &
699 dpa, intz_dpa, intx_dpa, inty_dpa, &
700 g%bathyT, dz_neglect, cs%useMassWghtInterp)
703 do j=jsq,jeq+1 ;
do i=isq,ieq+1
704 intz_dpa(i,j) = intz_dpa(i,j)*gv%Z_to_H
708 do j=jsq,jeq+1 ;
do i=isq,ieq+1
709 dz_geo(i,j) = g_earth_z_geo * gv%H_to_Z*h(i,j,k)
710 dpa(i,j) = (gv%Rlay(k) - rho_ref) * dz_geo(i,j)
711 intz_dpa(i,j) = 0.5*(gv%Rlay(k) - rho_ref) * dz_geo(i,j)*h(i,j,k)
714 do j=js,je ;
do i=isq,ieq
715 intx_dpa(i,j) = 0.5*(gv%Rlay(k) - rho_ref) * (dz_geo(i,j) + dz_geo(i+1,j))
718 do j=jsq,jeq ;
do i=is,ie
719 inty_dpa(i,j) = 0.5*(gv%Rlay(k) - rho_ref) * (dz_geo(i,j) + dz_geo(i,j+1))
725 do j=js,je ;
do i=isq,ieq
726 pfu(i,j,k) = (((pa(i,j)*h(i,j,k) + intz_dpa(i,j)) - &
727 (pa(i+1,j)*h(i+1,j,k) + intz_dpa(i+1,j))) + &
728 ((h(i+1,j,k) - h(i,j,k)) * intx_pa(i,j) - &
729 (e(i+1,j,k+1) - e(i,j,k+1)) * intx_dpa(i,j) * gv%Z_to_H)) * &
730 ((2.0*i_rho0*g%IdxCu(i,j)) / &
731 ((h(i,j,k) + h(i+1,j,k)) + h_neglect))
732 intx_pa(i,j) = intx_pa(i,j) + intx_dpa(i,j)
736 do j=jsq,jeq ;
do i=is,ie
737 pfv(i,j,k) = (((pa(i,j)*h(i,j,k) + intz_dpa(i,j)) - &
738 (pa(i,j+1)*h(i,j+1,k) + intz_dpa(i,j+1))) + &
739 ((h(i,j+1,k) - h(i,j,k)) * inty_pa(i,j) - &
740 (e(i,j+1,k+1) - e(i,j,k+1)) * inty_dpa(i,j) * gv%Z_to_H)) * &
741 ((2.0*i_rho0*g%IdyCv(i,j)) / &
742 ((h(i,j,k) + h(i,j+1,k)) + h_neglect))
743 inty_pa(i,j) = inty_pa(i,j) + inty_dpa(i,j)
746 do j=jsq,jeq+1 ;
do i=isq,ieq+1
747 pa(i,j) = pa(i,j) + dpa(i,j)
751 if (cs%GFS_scale < 1.0)
then
754 do j=js,je ;
do i=isq,ieq
755 pfu(i,j,k) = pfu(i,j,k) - (dm(i+1,j) - dm(i,j)) * g%IdxCu(i,j)
758 do j=jsq,jeq ;
do i=is,ie
759 pfv(i,j,k) = pfv(i,j,k) - (dm(i,j+1) - dm(i,j)) * g%IdyCv(i,j)
764 if (
present(pbce))
then
765 call set_pbce_bouss(e, tv_tmp, g, gv, us, cs%Rho0, cs%GFS_scale, pbce)
768 if (
present(eta))
then
774 do j=jsq,jeq+1 ;
do i=isq,ieq+1
775 eta(i,j) = e(i,j,1)*gv%Z_to_H + e_tidal(i,j)*gv%Z_to_H
779 do j=jsq,jeq+1 ;
do i=isq,ieq+1
780 eta(i,j) = e(i,j,1)*gv%Z_to_H
785 if (cs%id_e_tidal>0)
call post_data(cs%id_e_tidal, e_tidal, cs%diag)
791 type(time_type),
target,
intent(in) :: time
796 type(
diag_ctrl),
target,
intent(inout) :: diag
800 # include "version_variable.h"
801 character(len=40) :: mdl
804 if (
associated(cs))
then
805 call mom_error(warning,
"PressureForce_init called with an associated "// &
806 "control structure.")
808 else ;
allocate(cs) ;
endif
810 cs%diag => diag ; cs%Time => time
811 if (
present(tides_csp))
then
812 if (
associated(tides_csp)) cs%tides_CSp => tides_csp
815 mdl =
"MOM_PressureForce_AFV"
817 call get_param(param_file, mdl,
"RHO_0", cs%Rho0, &
818 "The mean ocean density used with BOUSSINESQ true to "//&
819 "calculate accelerations and the mass for conservation "//&
820 "properties, or with BOUSSINSEQ false to convert some "//&
821 "parameters from vertical units of m to kg m-2.", &
822 units=
"kg m-3", default=1035.0)
823 call get_param(param_file, mdl,
"TIDES", cs%tides, &
824 "If true, apply tidal momentum forcing.", default=.false.)
825 call get_param(param_file,
"MOM",
"USE_REGRIDDING", use_ale, &
826 "If True, use the ALE algorithm (regridding/remapping). "//&
827 "If False, use the layered isopycnal algorithm.", default=.false. )
828 call get_param(param_file, mdl,
"MASS_WEIGHT_IN_PRESSURE_GRADIENT", cs%useMassWghtInterp, &
829 "If true, use mass weighting when interpolating T/S for "//&
830 "integrals near the bathymetry in AFV pressure gradient "//&
831 "calculations.", default=.false.)
832 call get_param(param_file, mdl,
"RECONSTRUCT_FOR_PRESSURE", cs%reconstruct, &
833 "If True, use vertical reconstruction of T & S within "//&
834 "the integrals of the FV pressure gradient calculation. "//&
835 "If False, use the constant-by-layer algorithm. "//&
836 "The default is set by USE_REGRIDDING.", &
838 call get_param(param_file, mdl,
"PRESSURE_RECONSTRUCTION_SCHEME", cs%Recon_Scheme, &
839 "Order of vertical reconstruction of T/S to use in the "//&
840 "integrals within the FV pressure gradient calculation.\n"//&
841 " 0: PCM or no reconstruction.\n"//&
842 " 1: PLM reconstruction.\n"//&
843 " 2: PPM reconstruction.", default=1)
844 call get_param(param_file, mdl,
"BOUNDARY_EXTRAPOLATION_PRESSURE", cs%boundary_extrap, &
845 "If true, the reconstruction of T & S for pressure in "//&
846 "boundary cells is extrapolated, rather than using PCM "//&
847 "in these cells. If true, the same order polynomial is "//&
848 "used as is used for the interior cells.", default=.true.)
851 cs%id_e_tidal = register_diag_field(
'ocean_model',
'e_tidal', diag%axesT1, &
852 time,
'Tidal Forcing Astronomical and SAL Height Anomaly',
'meter', conversion=us%Z_to_m)
856 if (gv%g_prime(1) /= gv%g_Earth) cs%GFS_scale = gv%g_prime(1) / gv%g_Earth
858 call log_param(param_file, mdl,
"GFS / G_EARTH", cs%GFS_scale)
866 if (
associated(cs))
deallocate(cs)