@@ -128,6 +128,8 @@ module MOM_vert_friction
128
128
! integer :: id_hf_du_dt_visc = -1, id_hf_dv_dt_visc = -1
129
129
integer :: id_h_du_dt_visc = - 1 , id_h_dv_dt_visc = - 1
130
130
integer :: id_hf_du_dt_visc_2d = - 1 , id_hf_dv_dt_visc_2d = - 1
131
+ integer :: id_h_du_dt_str = - 1 , id_h_dv_dt_str = - 1
132
+ integer :: id_du_dt_str_visc_rem = - 1 , id_dv_dt_str_visc_rem = - 1
131
133
! >@}
132
134
133
135
type (PointAccel_CS), pointer :: PointAccel_CSp = > NULL () ! < A pointer to the control structure
@@ -219,6 +221,10 @@ subroutine vertvisc(u, v, h, forces, visc, dt, OBC, ADp, CDp, G, GV, US, CS, &
219
221
220
222
real , allocatable , dimension (:,:,:) :: h_du_dt_visc ! h x du_dt_visc [H L T-2 ~> m2 s-2]
221
223
real , allocatable , dimension (:,:,:) :: h_dv_dt_visc ! h x dv_dt_visc [H L T-2 ~> m2 s-2]
224
+ real , allocatable , dimension (:,:,:) :: h_du_dt_str ! h x du_dt_str [H L T-2 ~> m2 s-2]
225
+ real , allocatable , dimension (:,:,:) :: h_dv_dt_str ! h x dv_dt_str [H L T-2 ~> m2 s-2]
226
+ real , allocatable , dimension (:,:,:) :: du_dt_str_visc_rem ! du_dt_str x visc_rem_u [L T-2 ~> m s-2]
227
+ real , allocatable , dimension (:,:,:) :: dv_dt_str_visc_rem ! dv_dt_str x visc_rem_v [L T-2 ~> m s-2]
222
228
223
229
logical :: do_i(SZIB_(G))
224
230
logical :: DoStokesMixing
@@ -565,6 +571,44 @@ subroutine vertvisc(u, v, h, forces, visc, dt, OBC, ADp, CDp, G, GV, US, CS, &
565
571
deallocate (h_dv_dt_visc)
566
572
endif
567
573
574
+ if (CS% id_h_du_dt_str > 0 ) then
575
+ allocate (h_du_dt_str(G% IsdB:G% IedB,G% jsd:G% jed,GV% ke))
576
+ h_du_dt_str(:,:,:) = 0.0
577
+ do k= 1 ,nz ; do j= js,je ; do I= Isq,Ieq
578
+ h_du_dt_str(I,j,k) = ADp% du_dt_str(I,j,k) * ADp% diag_hu(I,j,k)
579
+ enddo ; enddo ; enddo
580
+ call post_data(CS% id_h_du_dt_str, h_du_dt_str, CS% diag)
581
+ deallocate (h_du_dt_str)
582
+ endif
583
+ if (CS% id_h_dv_dt_str > 0 ) then
584
+ allocate (h_dv_dt_str(G% isd:G% ied,G% JsdB:G% JedB,GV% ke))
585
+ h_dv_dt_str(:,:,:) = 0.0
586
+ do k= 1 ,nz ; do J= Jsq,Jeq ; do i= is,ie
587
+ h_dv_dt_str(i,J,k) = ADp% dv_dt_str(i,J,k) * ADp% diag_hv(i,J,k)
588
+ enddo ; enddo ; enddo
589
+ call post_data(CS% id_h_dv_dt_str, h_dv_dt_str, CS% diag)
590
+ deallocate (h_dv_dt_str)
591
+ endif
592
+
593
+ if (CS% id_du_dt_str_visc_rem > 0 ) then
594
+ allocate (du_dt_str_visc_rem(G% IsdB:G% IedB,G% jsd:G% jed,GV% ke))
595
+ du_dt_str_visc_rem(:,:,:) = 0.0
596
+ do k= 1 ,nz ; do j= js,je ; do I= Isq,Ieq
597
+ du_dt_str_visc_rem(I,j,k) = ADp% du_dt_str(I,j,k) * ADp% visc_rem_u(I,j,k)
598
+ enddo ; enddo ; enddo
599
+ call post_data(CS% id_du_dt_str_visc_rem, du_dt_str_visc_rem, CS% diag)
600
+ deallocate (du_dt_str_visc_rem)
601
+ endif
602
+ if (CS% id_dv_dt_str_visc_rem > 0 ) then
603
+ allocate (dv_dt_str_visc_rem(G% isd:G% ied,G% JsdB:G% JedB,GV% ke))
604
+ dv_dt_str_visc_rem(:,:,:) = 0.0
605
+ do k= 1 ,nz ; do J= Jsq,Jeq ; do i= is,ie
606
+ dv_dt_str_visc_rem(i,J,k) = ADp% dv_dt_str(i,J,k) * ADp% visc_rem_v(i,J,k)
607
+ enddo ; enddo ; enddo
608
+ call post_data(CS% id_dv_dt_str_visc_rem, dv_dt_str_visc_rem, CS% diag)
609
+ deallocate (dv_dt_str_visc_rem)
610
+ endif
611
+
568
612
end subroutine vertvisc
569
613
570
614
! > Calculate the fraction of momentum originally in a layer that remains in the water column
@@ -1914,6 +1958,38 @@ subroutine vertvisc_init(MIS, Time, G, GV, US, param_file, diag, ADp, dirs, &
1914
1958
call safe_alloc_ptr(ADp% diag_hv,isd,ied,JsdB,JedB,nz)
1915
1959
endif
1916
1960
1961
+ CS% id_h_du_dt_str = register_diag_field(' ocean_model' , ' h_du_dt_str' , diag% axesCuL, Time, &
1962
+ ' Thickness Multiplied Zonal Acceleration from Surface Wind Stresses' , ' m2 s-2' , &
1963
+ conversion= GV% H_to_m* US% L_T2_to_m_s2)
1964
+ if (CS% id_h_du_dt_str > 0 ) then
1965
+ call safe_alloc_ptr(ADp% du_dt_str,IsdB,IedB,jsd,jed,nz)
1966
+ call safe_alloc_ptr(ADp% diag_hu,IsdB,IedB,jsd,jed,nz)
1967
+ endif
1968
+
1969
+ CS% id_h_dv_dt_str = register_diag_field(' ocean_model' , ' h_dv_dt_str' , diag% axesCvL, Time, &
1970
+ ' Thickness Multiplied Meridional Acceleration from Surface Wind Stresses' , ' m2 s-2' , &
1971
+ conversion= GV% H_to_m* US% L_T2_to_m_s2)
1972
+ if (CS% id_h_dv_dt_str > 0 ) then
1973
+ call safe_alloc_ptr(ADp% dv_dt_str,isd,ied,JsdB,JedB,nz)
1974
+ call safe_alloc_ptr(ADp% diag_hv,isd,ied,JsdB,JedB,nz)
1975
+ endif
1976
+
1977
+ CS% id_du_dt_str_visc_rem = register_diag_field(' ocean_model' , ' du_dt_str_visc_rem' , diag% axesCuL, Time, &
1978
+ ' Zonal Acceleration from Surface Wind Stresses multiplied by viscous remnant' , ' m s-2' , &
1979
+ conversion= US% L_T2_to_m_s2)
1980
+ if (CS% id_du_dt_str_visc_rem > 0 ) then
1981
+ call safe_alloc_ptr(ADp% du_dt_str,IsdB,IedB,jsd,jed,nz)
1982
+ call safe_alloc_ptr(ADp% visc_rem_u,IsdB,IedB,jsd,jed,nz)
1983
+ endif
1984
+
1985
+ CS% id_dv_dt_str_visc_rem = register_diag_field(' ocean_model' , ' dv_dt_str_visc_rem' , diag% axesCvL, Time, &
1986
+ ' Meridional Acceleration from Surface Wind Stresses multiplied by viscous remnant' , ' m s-2' , &
1987
+ conversion= US% L_T2_to_m_s2)
1988
+ if (CS% id_dv_dt_str_visc_rem > 0 ) then
1989
+ call safe_alloc_ptr(ADp% dv_dt_str,isd,ied,JsdB,JedB,nz)
1990
+ call safe_alloc_ptr(ADp% visc_rem_v,isd,ied,JsdB,JedB,nz)
1991
+ endif
1992
+
1917
1993
if ((len_trim (CS% u_trunc_file) > 0 ) .or. (len_trim (CS% v_trunc_file) > 0 )) &
1918
1994
call PointAccel_init(MIS, Time, G, param_file, diag, dirs, CS% PointAccel_CSp)
1919
1995
0 commit comments