Skip to content

Commit 9aa01c9

Browse files
Caroline CardinaleCaroline Cardinale
authored andcommitted
Merge branch 'dev/gfdl' of https://github.com/NOAA-GFDL/MOM6 into dev/gfdl
2 parents 5c49c2d + f348179 commit 9aa01c9

File tree

6 files changed

+38
-23
lines changed

6 files changed

+38
-23
lines changed

config_src/ice_solo_driver/ice_shelf_driver.F90

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,15 @@ program SHELF_main
5454
use MOM_restart, only : save_restart
5555
! use MOM_sum_output, only : write_energy, accumulate_net_input
5656
! use MOM_sum_output, only : MOM_sum_output_init, sum_output_CS
57+
use MOM_string_functions, only : uppercase
5758
! use MOM_surface_forcing, only : set_forcing, average_forcing
5859
! use MOM_surface_forcing, only : surface_forcing_init, surface_forcing_CS
5960
use MOM_time_manager, only : time_type, set_date, set_time, get_date, time_type_to_real
6061
use MOM_time_manager, only : operator(+), operator(-), operator(*), operator(/)
6162
use MOM_time_manager, only : operator(>), operator(<), operator(>=)
6263
use MOM_time_manager, only : increment_date, set_calendar_type, month_name
63-
use MOM_time_manager, only : JULIAN, NOLEAP, THIRTY_DAY_MONTHS, NO_CALENDAR
64+
use MOM_time_manager, only : JULIAN, GREGORIAN, NOLEAP, THIRTY_DAY_MONTHS
65+
use MOM_time_manager, only : NO_CALENDAR
6466
use MOM_write_cputime, only : write_cputime, MOM_write_cputime_init
6567
use MOM_write_cputime, only : write_cputime_start_clock, write_cputime_CS
6668

@@ -197,12 +199,14 @@ program SHELF_main
197199
read(unit,*) date
198200
call close_file(unit)
199201
else
200-
if (calendar(1:6) == 'julian') then ; calendar_type = JULIAN
202+
calendar = uppercase(calendar)
203+
if (calendar(1:6) == 'JULIAN') then ; calendar_type = JULIAN
204+
else if (calendar(1:9) == 'GREGORIAN') then ; calendar_type = GREGORIAN
201205
else if (calendar(1:6) == 'NOLEAP') then ; calendar_type = NOLEAP
202-
else if (calendar(1:10)=='thirty_day') then ; calendar_type = THIRTY_DAY_MONTHS
203-
else if (calendar(1:11)=='no_calendar') then; calendar_type = NO_CALENDAR
206+
else if (calendar(1:10)=='THIRTY_DAY') then ; calendar_type = THIRTY_DAY_MONTHS
207+
else if (calendar(1:11)=='NO_CALENDAR') then; calendar_type = NO_CALENDAR
204208
else if (calendar(1:1) /= ' ') then
205-
call MOM_error(FATAL,'MOM_driver: Invalid namelist value for calendar')
209+
call MOM_error(FATAL,'MOM_driver: Invalid namelist value '//trim(calendar)//' for calendar')
206210
else
207211
call MOM_error(FATAL,'MOM_driver: No namelist value for calendar')
208212
endif

config_src/solo_driver/MOM_driver.F90

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ program MOM_main
6060
use MOM_io, only : check_nml_error, io_infra_init, io_infra_end
6161
use MOM_io, only : APPEND_FILE, ASCII_FILE, READONLY_FILE, SINGLE_FILE
6262
use MOM_restart, only : save_restart
63+
use MOM_string_functions, only : uppercase
6364
use MOM_sum_output, only : write_energy, accumulate_net_input
6465
use MOM_sum_output, only : MOM_sum_output_init, sum_output_CS
6566
use MOM_surface_forcing, only : set_forcing, forcing_save_restart
@@ -68,7 +69,8 @@ program MOM_main
6869
use MOM_time_manager, only : operator(+), operator(-), operator(*), operator(/)
6970
use MOM_time_manager, only : operator(>), operator(<), operator(>=)
7071
use MOM_time_manager, only : increment_date, set_calendar_type, month_name
71-
use MOM_time_manager, only : JULIAN, NOLEAP, THIRTY_DAY_MONTHS, NO_CALENDAR
72+
use MOM_time_manager, only : JULIAN, GREGORIAN, NOLEAP, THIRTY_DAY_MONTHS
73+
use MOM_time_manager, only : NO_CALENDAR
7274
use MOM_variables, only : surface
7375
use MOM_verticalGrid, only : verticalGrid_type
7476
use MOM_write_cputime, only : write_cputime, MOM_write_cputime_init
@@ -263,12 +265,14 @@ program MOM_main
263265
read(unit,*) date
264266
call close_file(unit)
265267
else
266-
if (calendar(1:6) == 'julian') then ; calendar_type = JULIAN
268+
calendar = uppercase(calendar)
269+
if (calendar(1:6) == 'JULIAN') then ; calendar_type = JULIAN
270+
else if (calendar(1:9) == 'GREGORIAN') then ; calendar_type = GREGORIAN
267271
else if (calendar(1:6) == 'NOLEAP') then ; calendar_type = NOLEAP
268-
else if (calendar(1:10)=='thirty_day') then ; calendar_type = THIRTY_DAY_MONTHS
269-
else if (calendar(1:11)=='no_calendar') then; calendar_type = NO_CALENDAR
272+
else if (calendar(1:10)=='THIRTY_DAY') then ; calendar_type = THIRTY_DAY_MONTHS
273+
else if (calendar(1:11)=='NO_CALENDAR') then; calendar_type = NO_CALENDAR
270274
else if (calendar(1:1) /= ' ') then
271-
call MOM_error(FATAL,'MOM_driver: Invalid namelist value for calendar')
275+
call MOM_error(FATAL,'MOM_driver: Invalid namelist value '//trim(calendar)//' for calendar')
272276
else
273277
call MOM_error(FATAL,'MOM_driver: No namelist value for calendar')
274278
endif

src/ALE/MOM_ALE.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ subroutine ALE_offline_tracer_final( G, GV, h, tv, h_target, Reg, CS)
609609

610610
! Override old grid with new one. The new grid 'h_new' is built in
611611
! one of the 'build_...' routines above.
612-
!$OMP parallel do default(none) shared(isc,iec,jsc,jec,nk,h,h_target,CS)
612+
!$OMP parallel do default(shared)
613613
do k = 1,nk
614614
do j = jsc-1,jec+1 ; do i = isc-1,iec+1
615615
h(i,j,k) = h_new(i,j,k)

src/framework/MOM_time_manager.F90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ module MOM_time_manager
1818
use time_manager_mod, only : get_date, set_date, increment_date
1919
use time_manager_mod, only : days_in_month, month_name
2020
use time_manager_mod, only : set_calendar_type, get_calendar_type
21-
use time_manager_mod, only : JULIAN, NOLEAP, THIRTY_DAY_MONTHS, NO_CALENDAR
21+
use time_manager_mod, only : JULIAN, NOLEAP, THIRTY_DAY_MONTHS, GREGORIAN
22+
use time_manager_mod, only : NO_CALENDAR
2223

2324
implicit none ; private
2425

@@ -28,7 +29,7 @@ module MOM_time_manager
2829
public :: operator(>), operator(<), operator(>=), operator(<=)
2930
public :: operator(==), operator(/=), operator(//)
3031
public :: get_date, set_date, increment_date, month_name, days_in_month
31-
public :: JULIAN, NOLEAP, THIRTY_DAY_MONTHS, NO_CALENDAR
32+
public :: JULIAN, NOLEAP, THIRTY_DAY_MONTHS, GREGORIAN, NO_CALENDAR
3233
public :: set_calendar_type, get_calendar_type
3334

3435
end module MOM_time_manager

src/parameterizations/lateral/MOM_tidal_forcing.F90

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ module MOM_tidal_forcing
5050
!* *
5151
!***********************************************************************
5252

53-
use MOM_cpu_clock, only : cpu_clock_id, cpu_clock_begin, cpu_clock_end, CLOCK_MODULE
53+
use MOM_cpu_clock, only : cpu_clock_id, cpu_clock_begin, cpu_clock_end, &
54+
CLOCK_MODULE
55+
use MOM_domains, only : pass_var
5456
use MOM_error_handler, only : MOM_error, FATAL, WARNING
55-
use MOM_file_parser, only : get_param, log_version, param_file_type
56-
use MOM_grid, only : ocean_grid_type
57-
use MOM_io, only : field_exists, file_exists, read_data
58-
use MOM_time_manager, only : time_type, time_type_to_real
57+
use MOM_file_parser, only : get_param, log_version, param_file_type
58+
use MOM_grid, only : ocean_grid_type
59+
use MOM_io, only : field_exists, file_exists, read_data
60+
use MOM_time_manager, only : time_type, time_type_to_real
5961

6062
implicit none ; private
6163

@@ -164,11 +166,11 @@ subroutine tidal_forcing_init(Time, G, param_file, CS)
164166
lon_rad(i,j) = G%geoLonT(i,j)*deg_to_rad
165167
enddo ; enddo
166168
do j=js-1,je+1 ; do i=is-1,ie+1
167-
CS%sin_struct(i,j,1) = -sin(2.0*lat_rad(i,j)) * cos(lon_rad(i,j))
168-
CS%cos_struct(i,j,1) = sin(2.0*lat_rad(i,j)) * sin(lon_rad(i,j))
169+
CS%sin_struct(i,j,1) = -sin(2.0*lat_rad(i,j)) * sin(lon_rad(i,j))
170+
CS%cos_struct(i,j,1) = sin(2.0*lat_rad(i,j)) * cos(lon_rad(i,j))
169171
CS%sin_struct(i,j,2) = -cos(lat_rad(i,j))**2 * sin(2.0*lon_rad(i,j))
170-
CS%cos_struct(i,j,2) = cos(lat_rad(i,j))**2 * cos(2.0*lon_rad(i,j))
171-
CS%sin_struct(i,j,3) = 0.0
172+
CS%cos_struct(i,j,2) = cos(lat_rad(i,j))**2 * cos(2.0*lon_rad(i,j))
173+
CS%sin_struct(i,j,3) = 0.0
172174
CS%cos_struct(i,j,3) = (0.5-1.5*sin(lat_rad(i,j))**2)
173175
enddo ; enddo
174176

@@ -361,6 +363,8 @@ subroutine tidal_forcing_init(Time, G, param_file, CS)
361363
! Read variables with names like PHASE_SAL_M2 and AMP_SAL_M2.
362364
call find_in_files(tidal_input_files,"PHASE_SAL_"//trim(CS%const_name(c)),phase,G)
363365
call find_in_files(tidal_input_files,"AMP_SAL_"//trim(CS%const_name(c)),CS%ampsal(:,:,c),G)
366+
call pass_var(phase, G%domain,complete=.false.)
367+
call pass_var(CS%ampsal(:,:,c),G%domain,complete=.true.)
364368
do j=js-1,je+1 ; do i=is-1,ie+1
365369
CS%cosphasesal(i,j,c) = cos(phase(i,j)*deg_to_rad)
366370
CS%sinphasesal(i,j,c) = sin(phase(i,j)*deg_to_rad)
@@ -376,6 +380,8 @@ subroutine tidal_forcing_init(Time, G, param_file, CS)
376380
! Read variables with names like PHASE_PREV_M2 and AMP_PREV_M2.
377381
call find_in_files(tidal_input_files,"PHASE_PREV_"//trim(CS%const_name(c)),phase,G)
378382
call find_in_files(tidal_input_files,"AMP_PREV_"//trim(CS%const_name(c)),CS%amp_prev(:,:,c),G)
383+
call pass_var(phase, G%domain,complete=.false.)
384+
call pass_var(CS%amp_prev(:,:,c),G%domain,complete=.true.)
379385
do j=js-1,je+1 ; do i=is-1,ie+1
380386
CS%cosphase_prev(i,j,c) = cos(phase(i,j)*deg_to_rad)
381387
CS%sinphase_prev(i,j,c) = sin(phase(i,j)*deg_to_rad)

src/tracer/MOM_tracer_diabatic.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ subroutine applyTracerBoundaryFluxesInOut(G, GV, Tr, dt, fluxes, h, evap_CFL_lim
278278

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

0 commit comments

Comments
 (0)