Skip to content
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

Uncomment omega w2x entries #282

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
call allocate_forcing_type(G, fluxes, water=.true., heat=.true., ustar=.true., &
press=.true., fix_accum_bug=CS%fix_ustar_gustless_bug, &
cfc=CS%use_CFC, hevap=CS%enthalpy_cpl, tau_mag=.true.)
!call safe_alloc_ptr(fluxes%omega_w2x,isd,ied,jsd,jed)
call safe_alloc_ptr(fluxes%omega_w2x,isd,ied,jsd,jed)

call safe_alloc_ptr(fluxes%sw_vis_dir,isd,ied,jsd,jed)
call safe_alloc_ptr(fluxes%sw_vis_dif,isd,ied,jsd,jed)
Expand Down Expand Up @@ -704,7 +704,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)

call safe_alloc_ptr(forces%p_surf,isd,ied,jsd,jed)
call safe_alloc_ptr(forces%p_surf_full,isd,ied,jsd,jed)
!call safe_alloc_ptr(forces%omega_w2x,isd,ied,jsd,jed)
call safe_alloc_ptr(forces%omega_w2x,isd,ied,jsd,jed)

if (CS%rigid_sea_ice) then
call safe_alloc_ptr(forces%rigidity_ice_u,IsdB,IedB,jsd,jed)
Expand Down Expand Up @@ -865,7 +865,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
forces%tau_mag(i,j) = gustiness + G%mask2dT(i,j) * sqrt(taux_at_h(i,j)**2 + tauy_at_h(i,j)**2)
forces%ustar(i,j) = sqrt(gustiness*Irho0 + Irho0 * G%mask2dT(i,j) * &
sqrt(taux_at_h(i,j)**2 + tauy_at_h(i,j)**2))
!forces%omega_w2x(i,j) = atan(tauy_at_h(i,j), taux_at_h(i,j))
forces%omega_w2x(i,j) = atan(tauy_at_h(i,j), taux_at_h(i,j))
enddo ; enddo
call pass_vector(forces%taux, forces%tauy, G%Domain, halo=1)
else ! C-grid wind stresses.
Expand Down
40 changes: 20 additions & 20 deletions src/core/MOM_forcing_type.F90
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module MOM_forcing_type

! surface stress components and turbulent velocity scale
real, pointer, dimension(:,:) :: &
!omega_w2x => NULL(), & !< the counter-clockwise angle of the wind stress with respect
omega_w2x => NULL(), & !< the counter-clockwise angle of the wind stress with respect
ustar => NULL(), & !< surface friction velocity scale [Z T-1 ~> m s-1].
tau_mag => NULL(), & !< Magnitude of the wind stress averaged over tracer cells,
!! including any contributions from sub-gridscale variability
Expand Down Expand Up @@ -239,8 +239,8 @@ module MOM_forcing_type
tau_mag => NULL(), & !< Magnitude of the wind stress averaged over tracer cells, including any
!! contributions from sub-gridscale variability or gustiness [R L Z T-2 ~> Pa]
ustar => NULL(), & !< surface friction velocity scale [Z T-1 ~> m s-1].
net_mass_src => NULL() !< The net mass source to the ocean [R Z T-1 ~> kg m-2 s-1]
!omega_w2x => NULL() !< the counter-clockwise angle of the wind stress with respect
net_mass_src => NULL(), & !< The net mass source to the ocean [R Z T-1 ~> kg m-2 s-1]
omega_w2x => NULL() !< the counter-clockwise angle of the wind stress with respect
!! to the horizontal abscissa (x-coordinate) at tracer points [rad].

! applied surface pressure from other component models (e.g., atmos, sea ice, land ice)
Expand Down Expand Up @@ -378,7 +378,7 @@ module MOM_forcing_type
integer :: id_taux = -1
integer :: id_tauy = -1
integer :: id_ustar = -1
!integer :: id_omega_w2x = -1
integer :: id_omega_w2x = -1
integer :: id_tau_mag = -1
integer :: id_psurf = -1
integer :: id_TKE_tidal = -1
Expand Down Expand Up @@ -1506,8 +1506,8 @@ subroutine register_forcing_type_diags(Time, diag, US, use_temperature, handles,
'Surface friction velocity = [(gustiness + tau_magnitude)/rho0]^(1/2)', &
'm s-1', conversion=US%Z_to_m*US%s_to_T)

!handles%id_omega_w2x = register_diag_field('ocean_model', 'omega_w2x', diag%axesT1, Time, &
! 'Counter-clockwise angle of the wind stress from the horizontal axis.', 'rad')
handles%id_omega_w2x = register_diag_field('ocean_model', 'omega_w2x', diag%axesT1, Time, &
'Counter-clockwise angle of the wind stress from the horizontal axis.', 'rad')

if (present(use_berg_fluxes)) then
if (use_berg_fluxes) then
Expand Down Expand Up @@ -2370,11 +2370,11 @@ subroutine copy_common_forcing_fields(forces, fluxes, G, skip_pres)
fluxes%ustar(i,j) = forces%ustar(i,j)
enddo ; enddo
endif
!if (associated(forces%omega_w2x) .and. associated(fluxes%omega_w2x)) then
! do j=js,je ; do i=is,ie
! fluxes%omega_w2x(i,j) = forces%omega_w2x(i,j)
! enddo ; enddo
!endif
if (associated(forces%omega_w2x) .and. associated(fluxes%omega_w2x)) then
do j=js,je ; do i=is,ie
fluxes%omega_w2x(i,j) = forces%omega_w2x(i,j)
enddo ; enddo
endif
if (associated(forces%tau_mag) .and. associated(fluxes%tau_mag)) then
do j=js,je ; do i=is,ie
fluxes%tau_mag(i,j) = forces%tau_mag(i,j)
Expand Down Expand Up @@ -2516,11 +2516,11 @@ subroutine copy_back_forcing_fields(fluxes, forces, G)
forces%ustar(i,j) = fluxes%ustar(i,j)
enddo ; enddo
endif
!if (associated(forces%omega_w2x) .and. associated(fluxes%omega_w2x)) then
! do j=js,je ; do i=is,ie
! forces%omega_w2x(i,j) = fluxes%omega_w2x(i,j)
! enddo ; enddo
!endif
if (associated(forces%omega_w2x) .and. associated(fluxes%omega_w2x)) then
do j=js,je ; do i=is,ie
forces%omega_w2x(i,j) = fluxes%omega_w2x(i,j)
enddo ; enddo
endif
if (associated(forces%tau_mag) .and. associated(fluxes%tau_mag)) then
do j=js,je ; do i=is,ie
forces%tau_mag(i,j) = fluxes%tau_mag(i,j)
Expand Down Expand Up @@ -3172,8 +3172,8 @@ subroutine forcing_diagnostics(fluxes_in, sfc_state, G_in, US, time_end, diag, h
if ((handles%id_ustar > 0) .and. associated(fluxes%ustar)) &
call post_data(handles%id_ustar, fluxes%ustar, diag)

!if ((handles%id_omega_w2x > 0) .and. associated(fluxes%omega_w2x)) &
! call post_data(handles%id_omega_w2x, fluxes%omega_w2x, diag)
if ((handles%id_omega_w2x > 0) .and. associated(fluxes%omega_w2x)) &
call post_data(handles%id_omega_w2x, fluxes%omega_w2x, diag)

if ((handles%id_ustar_berg > 0) .and. associated(fluxes%ustar_berg)) &
call post_data(handles%id_ustar_berg, fluxes%ustar_berg, diag)
Expand Down Expand Up @@ -3512,7 +3512,7 @@ end subroutine myAlloc
subroutine deallocate_forcing_type(fluxes)
type(forcing), intent(inout) :: fluxes !< Forcing fields structure

!if (associated(fluxes%omega_w2x)) deallocate(fluxes%omega_w2x)
if (associated(fluxes%omega_w2x)) deallocate(fluxes%omega_w2x)
if (associated(fluxes%ustar)) deallocate(fluxes%ustar)
if (associated(fluxes%ustar_gustless)) deallocate(fluxes%ustar_gustless)
if (associated(fluxes%tau_mag)) deallocate(fluxes%tau_mag)
Expand Down Expand Up @@ -3572,7 +3572,7 @@ end subroutine deallocate_forcing_type
subroutine deallocate_mech_forcing(forces)
type(mech_forcing), intent(inout) :: forces !< Forcing fields structure

!if (associated(forces%omega_w2x)) deallocate(forces%omega_w2x)
if (associated(forces%omega_w2x)) deallocate(forces%omega_w2x)
if (associated(forces%taux)) deallocate(forces%taux)
if (associated(forces%tauy)) deallocate(forces%tauy)
if (associated(forces%ustar)) deallocate(forces%ustar)
Expand Down
2 changes: 1 addition & 1 deletion src/user/MOM_wave_interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ subroutine Update_Surface_Waves(G, GV, US, Time_present, dt, CS, forces)
enddo
do jj=G%jsc,G%jec
do ii=G%isc,G%iec
!CS%Omega_w2x(ii,jj) = forces%omega_w2x(ii,jj)
CS%Omega_w2x(ii,jj) = forces%omega_w2x(ii,jj)
do b=1,CS%NumBands
CS%UStk_Hb(ii,jj,b) = US%m_s_to_L_T*forces%UStkb(ii,jj,b)
CS%VStk_Hb(ii,jj,b) = US%m_s_to_L_T*forces%VStkb(ii,jj,b)
Expand Down
Loading