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

Gcc 7 4 0 patch #1

Merged
merged 6 commits into from
Oct 25, 2019
Merged
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
9 changes: 7 additions & 2 deletions .testing/tc4/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
USE_REGRIDDING = True ! [Boolean] default = False
! If True, use the ALE algorithm (regridding/remapping). If False, use the
! layered isopycnal algorithm.
DT = 300.0 ! [s]
DT = 1200.0 ! [s]
! The (baroclinic) dynamics time step. The time-step that is actually used will
! be an integer fraction of the forcing time-step (DT_FORCING in ocean-only mode
! or the coupling timestep in coupled mode.)
DT_THERM = 3600.0 ! [s] default = 300.0
! The thermodynamic and tracer advection time step. Ideally DT_THERM should be
! an integer multiple of DT and less than the forcing or coupling time-step,
! unless THERMO_SPANS_COUPLING is true, in which case DT_THERM can be an integer
! multiple of the coupling timestep. By default DT_THERM is set to DT.
C_P = 3925.0 ! [J kg-1 K-1] default = 3991.86795711963
! The heat capacity of sea water, approximated as a constant. This is only used
! if ENABLE_THERMODYNAMICS is true. The default value is from the TEOS-10
Expand Down Expand Up @@ -377,7 +382,7 @@ WIND_CONFIG = "zero" !
! === module MOM_restart ===

! === module MOM_main (MOM_driver) ===
DAYMAX = 1.0 ! [days]
DAYMAX = 0.25 ! [days]
! The final time of the whole simulation, in units of TIMEUNIT seconds. This
! also sets the potential end time of the present run segment if the end time is
! not set via ocean_solo_nml in input.nml.
Expand Down
2 changes: 1 addition & 1 deletion .testing/tc4/build_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def t_fc(x, y, z, radius=5.0, tmag=1.0):


ny, nx = x.shape
nz = 10
nz = 3
z = (np.arange(nz) * zbot0) / nz

temp = t_fc(x, y, z)
Expand Down
6 changes: 3 additions & 3 deletions src/ALE/MOM_ALE.F90
Original file line number Diff line number Diff line change
Expand Up @@ -799,12 +799,12 @@ subroutine remap_all_state_vars(CS_remapping, CS_ALE, G, GV, h_old, h_new, Reg,

! Intermediate steps for tendency of tracer concentration and tracer content.
if (present(dt)) then
if (Tr%id_remap_conc>0) then
if (Tr%id_remap_conc > 0) then
do k=1,GV%ke
work_conc(i,j,k) = (u_column(k) - Tr%t(i,j,k) ) * Idt
work_conc(i,j,k) = (u_column(k) - Tr%t(i,j,k)) * Idt
enddo
endif
if (Tr%id_remap_cont>0. .or. Tr%id_remap_cont_2d>0) then
if (Tr%id_remap_cont > 0 .or. Tr%id_remap_cont_2d > 0) then
do k=1,GV%ke
work_cont(i,j,k) = (u_column(k)*h2(k) - Tr%t(i,j,k)*h1(k)) * Idt
enddo
Expand Down
14 changes: 9 additions & 5 deletions src/diagnostics/MOM_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1859,6 +1859,7 @@ subroutine write_static_fields(G, GV, US, tv, diag)

! Local variables
integer :: id
logical :: use_temperature

id = register_static_field('ocean_model', 'geolat', diag%axesT1, &
'Latitude of tracer (T) points', 'degrees_north')
Expand Down Expand Up @@ -2011,11 +2012,14 @@ subroutine write_static_fields(G, GV, US, tv, diag)
cmor_long_name='reference sea water density for boussinesq approximation')
if (id > 0) call post_data(id, GV%Rho0, diag, .true.)

id = register_static_field('ocean_model','C_p', diag%axesNull, &
'heat capacity of sea water', 'J kg-1 K-1', cmor_field_name='cpocean', &
cmor_standard_name='specific_heat_capacity_of_sea_water', &
cmor_long_name='specific_heat_capacity_of_sea_water')
if (id > 0) call post_data(id, tv%C_p, diag, .true.)
use_temperature = associated(tv%T)
if (use_temperature) then
id = register_static_field('ocean_model','C_p', diag%axesNull, &
'heat capacity of sea water', 'J kg-1 K-1', cmor_field_name='cpocean', &
cmor_standard_name='specific_heat_capacity_of_sea_water', &
cmor_long_name='specific_heat_capacity_of_sea_water')
if (id > 0) call post_data(id, tv%C_p, diag, .true.)
endif

end subroutine write_static_fields

Expand Down