Skip to content

Commit

Permalink
Merge pull request #526 from awallcraft/dev/gfdl
Browse files Browse the repository at this point in the history
Pipeline passed: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/1984

I had thought this was going to change answers for the "global" configurations (it did not) untill I saw the comment that "forcing is from files". Yet another gap in the code coverage!
  • Loading branch information
adcroft authored Jun 20, 2017
2 parents 9ccbe6f + 4274481 commit f348179
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions src/parameterizations/lateral/MOM_tidal_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ module MOM_tidal_forcing
!* *
!***********************************************************************

use MOM_cpu_clock, only : cpu_clock_id, cpu_clock_begin, cpu_clock_end, CLOCK_MODULE
use MOM_cpu_clock, only : cpu_clock_id, cpu_clock_begin, cpu_clock_end, &
CLOCK_MODULE
use MOM_domains, only : pass_var
use MOM_error_handler, only : MOM_error, FATAL, WARNING
use MOM_file_parser, only : get_param, log_version, param_file_type
use MOM_grid, only : ocean_grid_type
use MOM_io, only : field_exists, file_exists, read_data
use MOM_time_manager, only : time_type, time_type_to_real
use MOM_file_parser, only : get_param, log_version, param_file_type
use MOM_grid, only : ocean_grid_type
use MOM_io, only : field_exists, file_exists, read_data
use MOM_time_manager, only : time_type, time_type_to_real

implicit none ; private

Expand Down Expand Up @@ -164,11 +166,11 @@ subroutine tidal_forcing_init(Time, G, param_file, CS)
lon_rad(i,j) = G%geoLonT(i,j)*deg_to_rad
enddo ; enddo
do j=js-1,je+1 ; do i=is-1,ie+1
CS%sin_struct(i,j,1) = -sin(2.0*lat_rad(i,j)) * cos(lon_rad(i,j))
CS%cos_struct(i,j,1) = sin(2.0*lat_rad(i,j)) * sin(lon_rad(i,j))
CS%sin_struct(i,j,1) = -sin(2.0*lat_rad(i,j)) * sin(lon_rad(i,j))
CS%cos_struct(i,j,1) = sin(2.0*lat_rad(i,j)) * cos(lon_rad(i,j))
CS%sin_struct(i,j,2) = -cos(lat_rad(i,j))**2 * sin(2.0*lon_rad(i,j))
CS%cos_struct(i,j,2) = cos(lat_rad(i,j))**2 * cos(2.0*lon_rad(i,j))
CS%sin_struct(i,j,3) = 0.0
CS%cos_struct(i,j,2) = cos(lat_rad(i,j))**2 * cos(2.0*lon_rad(i,j))
CS%sin_struct(i,j,3) = 0.0
CS%cos_struct(i,j,3) = (0.5-1.5*sin(lat_rad(i,j))**2)
enddo ; enddo

Expand Down Expand Up @@ -361,6 +363,8 @@ subroutine tidal_forcing_init(Time, G, param_file, CS)
! Read variables with names like PHASE_SAL_M2 and AMP_SAL_M2.
call find_in_files(tidal_input_files,"PHASE_SAL_"//trim(CS%const_name(c)),phase,G)
call find_in_files(tidal_input_files,"AMP_SAL_"//trim(CS%const_name(c)),CS%ampsal(:,:,c),G)
call pass_var(phase, G%domain,complete=.false.)
call pass_var(CS%ampsal(:,:,c),G%domain,complete=.true.)
do j=js-1,je+1 ; do i=is-1,ie+1
CS%cosphasesal(i,j,c) = cos(phase(i,j)*deg_to_rad)
CS%sinphasesal(i,j,c) = sin(phase(i,j)*deg_to_rad)
Expand All @@ -376,6 +380,8 @@ subroutine tidal_forcing_init(Time, G, param_file, CS)
! Read variables with names like PHASE_PREV_M2 and AMP_PREV_M2.
call find_in_files(tidal_input_files,"PHASE_PREV_"//trim(CS%const_name(c)),phase,G)
call find_in_files(tidal_input_files,"AMP_PREV_"//trim(CS%const_name(c)),CS%amp_prev(:,:,c),G)
call pass_var(phase, G%domain,complete=.false.)
call pass_var(CS%amp_prev(:,:,c),G%domain,complete=.true.)
do j=js-1,je+1 ; do i=is-1,ie+1
CS%cosphase_prev(i,j,c) = cos(phase(i,j)*deg_to_rad)
CS%sinphase_prev(i,j,c) = sin(phase(i,j)*deg_to_rad)
Expand Down

0 comments on commit f348179

Please sign in to comment.