Skip to content

Commit

Permalink
Merge pull request #1 from MJHarrison-GFDL/gcc_7_4_0_patch
Browse files Browse the repository at this point in the history
Gcc 7 4 0 patch
  • Loading branch information
marshallward authored Oct 25, 2019
2 parents a5082d5 + 817bdde commit 1b96028
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
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

0 comments on commit 1b96028

Please sign in to comment.