-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3D thickness x momentum diagnostics #1398
Changes from 1 commit
f8854e7
f1b2320
aa32127
cf3b41f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,16 +160,19 @@ module MOM_dynamics_split_RK2 | |
integer :: id_PFu = -1, id_PFv = -1 | ||
integer :: id_CAu = -1, id_CAv = -1 | ||
! integer :: id_hf_PFu = -1, id_hf_PFv = -1 | ||
integer :: id_h_PFu = -1, id_h_PFv = -1 | ||
integer :: id_hf_PFu_2d = -1, id_hf_PFv_2d = -1 | ||
integer :: id_intz_PFu_2d = -1, id_intz_PFv_2d = -1 | ||
! integer :: id_hf_CAu = -1, id_hf_CAv = -1 | ||
integer :: id_h_CAu = -1, id_h_CAv = -1 | ||
integer :: id_hf_CAu_2d = -1, id_hf_CAv_2d = -1 | ||
integer :: id_intz_CAu_2d = -1, id_intz_CAv_2d = -1 | ||
|
||
! Split scheme only. | ||
integer :: id_uav = -1, id_vav = -1 | ||
integer :: id_u_BT_accel = -1, id_v_BT_accel = -1 | ||
! integer :: id_hf_u_BT_accel = -1, id_hf_v_BT_accel = -1 | ||
integer :: id_h_u_BT_accel = -1, id_h_v_BT_accel = -1 | ||
integer :: id_hf_u_BT_accel_2d = -1, id_hf_v_BT_accel_2d = -1 | ||
integer :: id_intz_u_BT_accel_2d = -1, id_intz_v_BT_accel_2d = -1 | ||
!>@} | ||
|
@@ -339,12 +342,15 @@ subroutine step_MOM_dyn_split_RK2(u, v, h, tv, visc, Time_local, dt, forces, p_s | |
hf_CAu_2d, hf_CAv_2d, & ! Depth integeral of hf_CAu, hf_CAv [L T-2 ~> m s-2]. | ||
hf_u_BT_accel_2d, hf_v_BT_accel_2d ! Depth integeral of hf_u_BT_accel, hf_v_BT_accel | ||
|
||
real, allocatable, dimension(:,:,:) :: h_PFu, h_CAu, h_u_BT_accel ! [L2 T-2 ~> m2 s-2]. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The units in the comments for these diagnostics are incorrect. They should be [H L T-2 ~> m2 s-2]. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. I have made the corrections. |
||
real, allocatable, dimension(:,:,:) :: h_PFv, h_CAv, h_v_BT_accel ! [L2 T-2 ~> m2 s-2]. | ||
|
||
real, dimension(SZIB_(G),SZJ_(G)) :: & | ||
intz_PFu_2d, intz_CAu_2d, intz_u_BT_accel_2d ! [L2 T-2 ~> m2 s-2]. | ||
|
||
real, dimension(SZI_(G),SZJB_(G)) :: & | ||
intz_PFv_2d, intz_CAv_2d, intz_v_BT_accel_2d ! [L2 T-2 ~> m2 s-2]. | ||
|
||
|
||
real :: dt_pred ! The time step for the predictor part of the baroclinic time stepping [T ~> s]. | ||
|
||
logical :: dyn_p_surf | ||
|
@@ -940,6 +946,25 @@ subroutine step_MOM_dyn_split_RK2(u, v, h, tv, visc, Time_local, dt, forces, p_s | |
deallocate(hf_PFv_2d) | ||
endif | ||
|
||
if (CS%id_h_PFu > 0) then | ||
allocate(h_PFu(G%IsdB:G%IedB,G%jsd:G%jed,GV%ke)) | ||
h_PFu(:,:,:) = 0.0 | ||
do k=1,nz ; do j=js,je ; do I=Isq,Ieq | ||
h_PFu(I,j,k) = CS%PFu(I,j,k) * CS%ADp%diag_hu(I,j,k) | ||
enddo ; enddo ; enddo | ||
call post_data(CS%id_h_PFu, h_PFu, CS%diag) | ||
deallocate(h_PFu) | ||
endif | ||
if (CS%id_h_PFv > 0) then | ||
allocate(h_PFv(G%isd:G%ied,G%JsdB:G%JedB,GV%ke)) | ||
h_PFv(:,:,:) = 0.0 | ||
do k=1,nz ; do J=Jsq,Jeq ; do i=is,ie | ||
h_PFv(i,J,k) = CS%PFv(i,J,k) * CS%ADp%diag_hv(i,J,k) | ||
enddo ; enddo ; enddo | ||
call post_data(CS%id_h_PFv, h_PFv, CS%diag) | ||
deallocate(h_PFv) | ||
endif | ||
|
||
!if (CS%id_hf_CAu > 0) then | ||
! allocate(hf_CAu(G%IsdB:G%IedB,G%jsd:G%jed,GV%ke)) | ||
! do k=1,nz ; do j=js,je ; do I=Isq,Ieq | ||
|
@@ -988,6 +1013,25 @@ subroutine step_MOM_dyn_split_RK2(u, v, h, tv, visc, Time_local, dt, forces, p_s | |
deallocate(hf_CAv_2d) | ||
endif | ||
|
||
if (CS%id_h_CAu > 0) then | ||
allocate(h_CAu(G%IsdB:G%IedB,G%jsd:G%jed,GV%ke)) | ||
h_CAu(:,:,:) = 0.0 | ||
do k=1,nz ; do j=js,je ; do I=Isq,Ieq | ||
h_CAu(I,j,k) = CS%CAu(I,j,k) * CS%ADp%diag_hu(I,j,k) | ||
enddo ; enddo ; enddo | ||
call post_data(CS%id_h_CAu, h_CAu, CS%diag) | ||
deallocate(h_CAu) | ||
endif | ||
if (CS%id_h_CAv > 0) then | ||
allocate(h_CAv(G%isd:G%ied,G%JsdB:G%JedB,GV%ke)) | ||
h_CAv(:,:,:) = 0.0 | ||
do k=1,nz ; do J=Jsq,Jeq ; do i=is,ie | ||
h_CAv(i,J,k) = CS%CAv(i,J,k) * CS%ADp%diag_hv(i,J,k) | ||
enddo ; enddo ; enddo | ||
call post_data(CS%id_h_CAv, h_CAv, CS%diag) | ||
deallocate(h_CAv) | ||
endif | ||
|
||
!if (CS%id_hf_u_BT_accel > 0) then | ||
! allocate(hf_u_BT_accel(G%IsdB:G%IedB,G%jsd:G%jed,GV%ke)) | ||
! do k=1,nz ; do j=js,je ; do I=Isq,Ieq | ||
|
@@ -1036,6 +1080,25 @@ subroutine step_MOM_dyn_split_RK2(u, v, h, tv, visc, Time_local, dt, forces, p_s | |
deallocate(hf_v_BT_accel_2d) | ||
endif | ||
|
||
if (CS%id_h_u_BT_accel > 0) then | ||
allocate(h_u_BT_accel(G%IsdB:G%IedB,G%jsd:G%jed,GV%ke)) | ||
h_u_BT_accel(:,:,:) = 0.0 | ||
do k=1,nz ; do j=js,je ; do I=Isq,Ieq | ||
h_u_BT_accel(I,j,k) = CS%u_accel_bt(I,j,k) * CS%ADp%diag_hu(I,j,k) | ||
enddo ; enddo ; enddo | ||
call post_data(CS%id_h_u_BT_accel, h_u_BT_accel, CS%diag) | ||
deallocate(h_u_BT_accel) | ||
endif | ||
if (CS%id_h_v_BT_accel > 0) then | ||
allocate(h_v_BT_accel(G%isd:G%ied,G%JsdB:G%JedB,GV%ke)) | ||
h_v_BT_accel(:,:,:) = 0.0 | ||
do k=1,nz ; do J=Jsq,Jeq ; do i=is,ie | ||
h_v_BT_accel(i,J,k) = CS%v_accel_bt(i,J,k) * CS%ADp%diag_hv(i,J,k) | ||
enddo ; enddo ; enddo | ||
call post_data(CS%id_h_v_BT_accel, h_v_BT_accel, CS%diag) | ||
deallocate(h_v_BT_accel) | ||
endif | ||
|
||
if (CS%debug) then | ||
call MOM_state_chksum("Corrector ", u, v, h, uh, vh, G, GV, US, symmetric=sym) | ||
call uvchksum("Corrector avg [uv]", u_av, v_av, G%HI, haloshift=1, symmetric=sym, scale=US%L_T_to_m_s) | ||
|
@@ -1442,6 +1505,16 @@ subroutine initialize_dyn_split_RK2(u, v, h, uh, vh, eta, Time, G, GV, US, param | |
conversion=US%L_T2_to_m_s2) | ||
if(CS%id_hf_PFv_2d > 0) call safe_alloc_ptr(CS%ADp%diag_hfrac_v,isd,ied,JsdB,JedB,nz) | ||
|
||
CS%id_h_PFu = register_diag_field('ocean_model', 'h_PFu', diag%axesCuL, Time, & | ||
'Thickness Multiplied Zonal Pressure Force Acceleration', 'm2 s-2', & | ||
conversion=GV%H_to_m*US%L_T2_to_m_s2) | ||
if(CS%id_h_PFu > 0) call safe_alloc_ptr(CS%ADp%diag_hu,IsdB,IedB,jsd,jed,nz) | ||
|
||
CS%id_h_PFv = register_diag_field('ocean_model', 'h_PFv', diag%axesCvL, Time, & | ||
'Thickness Multiplied Meridional Pressure Force Acceleration', 'm2 s-2', & | ||
conversion=GV%H_to_m*US%L_T2_to_m_s2) | ||
if(CS%id_h_PFv > 0) call safe_alloc_ptr(CS%ADp%diag_hv,isd,ied,JsdB,JedB,nz) | ||
|
||
CS%id_intz_PFu_2d = register_diag_field('ocean_model', 'intz_PFu_2d', diag%axesCu1, Time, & | ||
'Depth-integral of Zonal Pressure Force Acceleration', 'm2 s-2', & | ||
conversion=GV%H_to_m*US%L_T2_to_m_s2) | ||
|
@@ -1462,6 +1535,16 @@ subroutine initialize_dyn_split_RK2(u, v, h, uh, vh, eta, Time, G, GV, US, param | |
conversion=US%L_T2_to_m_s2) | ||
if(CS%id_hf_CAv_2d > 0) call safe_alloc_ptr(CS%ADp%diag_hfrac_v,isd,ied,JsdB,JedB,nz) | ||
|
||
CS%id_h_CAu = register_diag_field('ocean_model', 'h_CAu', diag%axesCuL, Time, & | ||
'Thickness Multiplied Zonal Coriolis and Advective Acceleration', 'm2 s-2', & | ||
conversion=GV%H_to_m*US%L_T2_to_m_s2) | ||
if(CS%id_h_CAu > 0) call safe_alloc_ptr(CS%ADp%diag_hu,IsdB,IedB,jsd,jed,nz) | ||
|
||
CS%id_h_CAv = register_diag_field('ocean_model', 'h_CAv', diag%axesCvL, Time, & | ||
'Thickness Multiplied Meridional Coriolis and Advective Acceleration', 'm2 s-2', & | ||
conversion=GV%H_to_m*US%L_T2_to_m_s2) | ||
if(CS%id_h_CAv > 0) call safe_alloc_ptr(CS%ADp%diag_hv,isd,ied,JsdB,JedB,nz) | ||
|
||
CS%id_intz_CAu_2d = register_diag_field('ocean_model', 'intz_CAu_2d', diag%axesCu1, Time, & | ||
'Depth-integral of Zonal Coriolis and Advective Acceleration', 'm2 s-2', & | ||
conversion=GV%H_to_m*US%L_T2_to_m_s2) | ||
|
@@ -1502,6 +1585,16 @@ subroutine initialize_dyn_split_RK2(u, v, h, uh, vh, eta, Time, G, GV, US, param | |
conversion=US%L_T2_to_m_s2) | ||
if(CS%id_hf_v_BT_accel_2d > 0) call safe_alloc_ptr(CS%ADp%diag_hfrac_v,isd,ied,JsdB,JedB,nz) | ||
|
||
CS%id_h_u_BT_accel = register_diag_field('ocean_model', 'h_u_BT_accel', diag%axesCuL, Time, & | ||
'Thickness Multiplied Barotropic Anomaly Zonal Acceleration', 'm2 s-2', & | ||
conversion=GV%H_to_m*US%L_T2_to_m_s2) | ||
if(CS%id_h_u_BT_accel > 0) call safe_alloc_ptr(CS%ADp%diag_hu,IsdB,IedB,jsd,jed,nz) | ||
|
||
CS%id_h_v_BT_accel = register_diag_field('ocean_model', 'h_v_BT_accel', diag%axesCvL, Time, & | ||
'Thickness Multiplied Barotropic Anomaly Meridional Acceleration', 'm2 s-2', & | ||
conversion=GV%H_to_m*US%L_T2_to_m_s2) | ||
if(CS%id_h_v_BT_accel > 0) call safe_alloc_ptr(CS%ADp%diag_hv,isd,ied,JsdB,JedB,nz) | ||
|
||
CS%id_intz_u_BT_accel_2d = register_diag_field('ocean_model', 'intz_u_BT_accel_2d', diag%axesCu1, Time, & | ||
'Depth-integral of Barotropic Anomaly Zonal Acceleration', 'm2 s-2', & | ||
conversion=GV%H_to_m*US%L_T2_to_m_s2) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documented units of these diagnostics are incorrect. They should be [H L T-2 ~> m2 s-2].
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I have made the corrections.