Skip to content

Commit

Permalink
Merge branch 'dev/gfdl' of https://github.com/NOAA-GFDL/MOM6 into dev…
Browse files Browse the repository at this point in the history
…/gfdl
  • Loading branch information
Caroline Cardinale authored and Caroline Cardinale committed Jun 21, 2017
2 parents 5c49c2d + f348179 commit 9aa01c9
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 23 deletions.
14 changes: 9 additions & 5 deletions config_src/ice_solo_driver/ice_shelf_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ program SHELF_main
use MOM_restart, only : save_restart
! use MOM_sum_output, only : write_energy, accumulate_net_input
! use MOM_sum_output, only : MOM_sum_output_init, sum_output_CS
use MOM_string_functions, only : uppercase
! use MOM_surface_forcing, only : set_forcing, average_forcing
! use MOM_surface_forcing, only : surface_forcing_init, surface_forcing_CS
use MOM_time_manager, only : time_type, set_date, set_time, get_date, time_type_to_real
use MOM_time_manager, only : operator(+), operator(-), operator(*), operator(/)
use MOM_time_manager, only : operator(>), operator(<), operator(>=)
use MOM_time_manager, only : increment_date, set_calendar_type, month_name
use MOM_time_manager, only : JULIAN, NOLEAP, THIRTY_DAY_MONTHS, NO_CALENDAR
use MOM_time_manager, only : JULIAN, GREGORIAN, NOLEAP, THIRTY_DAY_MONTHS
use MOM_time_manager, only : NO_CALENDAR
use MOM_write_cputime, only : write_cputime, MOM_write_cputime_init
use MOM_write_cputime, only : write_cputime_start_clock, write_cputime_CS

Expand Down Expand Up @@ -197,12 +199,14 @@ program SHELF_main
read(unit,*) date
call close_file(unit)
else
if (calendar(1:6) == 'julian') then ; calendar_type = JULIAN
calendar = uppercase(calendar)
if (calendar(1:6) == 'JULIAN') then ; calendar_type = JULIAN
else if (calendar(1:9) == 'GREGORIAN') then ; calendar_type = GREGORIAN
else if (calendar(1:6) == 'NOLEAP') then ; calendar_type = NOLEAP
else if (calendar(1:10)=='thirty_day') then ; calendar_type = THIRTY_DAY_MONTHS
else if (calendar(1:11)=='no_calendar') then; calendar_type = NO_CALENDAR
else if (calendar(1:10)=='THIRTY_DAY') then ; calendar_type = THIRTY_DAY_MONTHS
else if (calendar(1:11)=='NO_CALENDAR') then; calendar_type = NO_CALENDAR
else if (calendar(1:1) /= ' ') then
call MOM_error(FATAL,'MOM_driver: Invalid namelist value for calendar')
call MOM_error(FATAL,'MOM_driver: Invalid namelist value '//trim(calendar)//' for calendar')
else
call MOM_error(FATAL,'MOM_driver: No namelist value for calendar')
endif
Expand Down
14 changes: 9 additions & 5 deletions config_src/solo_driver/MOM_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ program MOM_main
use MOM_io, only : check_nml_error, io_infra_init, io_infra_end
use MOM_io, only : APPEND_FILE, ASCII_FILE, READONLY_FILE, SINGLE_FILE
use MOM_restart, only : save_restart
use MOM_string_functions, only : uppercase
use MOM_sum_output, only : write_energy, accumulate_net_input
use MOM_sum_output, only : MOM_sum_output_init, sum_output_CS
use MOM_surface_forcing, only : set_forcing, forcing_save_restart
Expand All @@ -68,7 +69,8 @@ program MOM_main
use MOM_time_manager, only : operator(+), operator(-), operator(*), operator(/)
use MOM_time_manager, only : operator(>), operator(<), operator(>=)
use MOM_time_manager, only : increment_date, set_calendar_type, month_name
use MOM_time_manager, only : JULIAN, NOLEAP, THIRTY_DAY_MONTHS, NO_CALENDAR
use MOM_time_manager, only : JULIAN, GREGORIAN, NOLEAP, THIRTY_DAY_MONTHS
use MOM_time_manager, only : NO_CALENDAR
use MOM_variables, only : surface
use MOM_verticalGrid, only : verticalGrid_type
use MOM_write_cputime, only : write_cputime, MOM_write_cputime_init
Expand Down Expand Up @@ -263,12 +265,14 @@ program MOM_main
read(unit,*) date
call close_file(unit)
else
if (calendar(1:6) == 'julian') then ; calendar_type = JULIAN
calendar = uppercase(calendar)
if (calendar(1:6) == 'JULIAN') then ; calendar_type = JULIAN
else if (calendar(1:9) == 'GREGORIAN') then ; calendar_type = GREGORIAN
else if (calendar(1:6) == 'NOLEAP') then ; calendar_type = NOLEAP
else if (calendar(1:10)=='thirty_day') then ; calendar_type = THIRTY_DAY_MONTHS
else if (calendar(1:11)=='no_calendar') then; calendar_type = NO_CALENDAR
else if (calendar(1:10)=='THIRTY_DAY') then ; calendar_type = THIRTY_DAY_MONTHS
else if (calendar(1:11)=='NO_CALENDAR') then; calendar_type = NO_CALENDAR
else if (calendar(1:1) /= ' ') then
call MOM_error(FATAL,'MOM_driver: Invalid namelist value for calendar')
call MOM_error(FATAL,'MOM_driver: Invalid namelist value '//trim(calendar)//' for calendar')
else
call MOM_error(FATAL,'MOM_driver: No namelist value for calendar')
endif
Expand Down
2 changes: 1 addition & 1 deletion src/ALE/MOM_ALE.F90
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ subroutine ALE_offline_tracer_final( G, GV, h, tv, h_target, Reg, CS)

! Override old grid with new one. The new grid 'h_new' is built in
! one of the 'build_...' routines above.
!$OMP parallel do default(none) shared(isc,iec,jsc,jec,nk,h,h_target,CS)
!$OMP parallel do default(shared)
do k = 1,nk
do j = jsc-1,jec+1 ; do i = isc-1,iec+1
h(i,j,k) = h_new(i,j,k)
Expand Down
5 changes: 3 additions & 2 deletions src/framework/MOM_time_manager.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ module MOM_time_manager
use time_manager_mod, only : get_date, set_date, increment_date
use time_manager_mod, only : days_in_month, month_name
use time_manager_mod, only : set_calendar_type, get_calendar_type
use time_manager_mod, only : JULIAN, NOLEAP, THIRTY_DAY_MONTHS, NO_CALENDAR
use time_manager_mod, only : JULIAN, NOLEAP, THIRTY_DAY_MONTHS, GREGORIAN
use time_manager_mod, only : NO_CALENDAR

implicit none ; private

Expand All @@ -28,7 +29,7 @@ module MOM_time_manager
public :: operator(>), operator(<), operator(>=), operator(<=)
public :: operator(==), operator(/=), operator(//)
public :: get_date, set_date, increment_date, month_name, days_in_month
public :: JULIAN, NOLEAP, THIRTY_DAY_MONTHS, NO_CALENDAR
public :: JULIAN, NOLEAP, THIRTY_DAY_MONTHS, GREGORIAN, NO_CALENDAR
public :: set_calendar_type, get_calendar_type

end module MOM_time_manager
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
2 changes: 1 addition & 1 deletion src/tracer/MOM_tracer_diabatic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ subroutine applyTracerBoundaryFluxesInOut(G, GV, Tr, dt, fluxes, h, evap_CFL_lim

!$OMP parallel do default(none) shared(is,ie,js,je,nz,h,Tr,G,GV,fluxes,dt, &
!$OMP IforcingDepthScale,minimum_forcing_depth, &
!$OMP numberOfGroundings,iGround,jGround, &
!$OMP numberOfGroundings,iGround,jGround,update_h, &
!$OMP in_flux,out_flux,hGrounding,Idt,evap_CFL_limit) &
!$OMP private(h2d,Tr2d,netMassInOut,netMassOut, &
!$OMP in_flux_1d,out_flux_1d,fractionOfForcing, &
Expand Down

0 comments on commit 9aa01c9

Please sign in to comment.