Skip to content

Commit 62cf04e

Browse files
committed
Silence new GCC 7 warnings.
1 parent 9d20c52 commit 62cf04e

File tree

7 files changed

+25
-25
lines changed

7 files changed

+25
-25
lines changed

assemble/Free_Surface.F90

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ subroutine insert_original_distance_to_bottom(state)
195195
type(scalar_field) :: original_bottomdist, original_bottomdist_remap
196196

197197
if (.not. has_scalar_field(state, "OriginalDistanceToBottom")) then
198-
ewrite(2, *), "Inserting OriginalDistanceToBottom field into state."
198+
ewrite(2, *) "Inserting OriginalDistanceToBottom field into state."
199199
bottomdist => extract_scalar_field(state, "DistanceToBottom")
200200
call allocate(original_bottomdist, bottomdist%mesh, "OriginalDistanceToBottom")
201201
call zero(original_bottomdist)
@@ -204,7 +204,7 @@ subroutine insert_original_distance_to_bottom(state)
204204
call deallocate(original_bottomdist)
205205

206206
! We also cache the OriginalDistanceToBottom on the pressure mesh
207-
ewrite(2, *), "Inserting OriginalDistanceToBottomPressureMesh field into state."
207+
ewrite(2, *) "Inserting OriginalDistanceToBottomPressureMesh field into state."
208208
p_mesh => extract_pressure_mesh(state)
209209
call allocate(original_bottomdist_remap, p_mesh, "OriginalDistanceToBottomPressureMesh")
210210
call remap_field(original_bottomdist, original_bottomdist_remap)

assemble/Geostrophic_Pressure.F90

+4-4
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ subroutine derive_interpolated_p_dirichlet_multiple(base_ps, base_positions, ps,
19861986

19871987
call clear_boundary_conditions(ps)
19881988

1989-
ewrite(2, *), "Adding strong Dirichlet bc for field " // trim(ps(1)%name)
1989+
ewrite(2, *) "Adding strong Dirichlet bc for field " // trim(ps(1)%name)
19901990
do i = 1, size(surface_eles)
19911991
surface_eles(i) = i
19921992
end do
@@ -1999,7 +1999,7 @@ subroutine derive_interpolated_p_dirichlet_multiple(base_ps, base_positions, ps,
19991999
call insert_surface_field(ps(1), 1, b_ps(1))
20002000
call deallocate(b_ps(1))
20012001
do i = 2, size(ps)
2002-
ewrite(2, *), "Adding strong Dirichlet bc for field " // trim(ps(i)%name)
2002+
ewrite(2, *) "Adding strong Dirichlet bc for field " // trim(ps(i)%name)
20032003
call add_boundary_condition_surface_elements(ps(i), "InterpolatedBoundary", "dirichlet", surface_eles)
20042004
ewrite_minmax(b_ps(i))
20052005
call insert_surface_field(ps(i), 1, b_ps(i))
@@ -2165,7 +2165,7 @@ subroutine decompose_p_mean_multiple(matrices, base_ps, positions, ps, solver_pa
21652165
end do
21662166
do i = 1, size(bc_ps, 1)
21672167
call clear_boundary_conditions(bc_ps(i))
2168-
ewrite(2, *), "Adding strong Dirichlet bc for field " // trim(bc_ps(i)%name)
2168+
ewrite(2, *) "Adding strong Dirichlet bc for field " // trim(bc_ps(i)%name)
21692169
call add_boundary_condition_surface_elements(bc_ps(i), "ConstantBoundary", "dirichlet", surface_eles)
21702170
call get_boundary_condition(bc_ps(i), 1, surface_mesh = bc_mesh, &
21712171
& surface_element_list = bc_surface_element_list)
@@ -2373,7 +2373,7 @@ subroutine decompose_p_optimal_multiple(matrices, base_ps, positions, ps, solver
23732373
end do
23742374
do i = 1, size(bc_ps, 1)
23752375
call clear_boundary_conditions(bc_ps(i))
2376-
ewrite(2, *), "Adding strong Dirichlet bc for field " // trim(bc_ps(i)%name)
2376+
ewrite(2, *) "Adding strong Dirichlet bc for field " // trim(bc_ps(i)%name)
23772377
call add_boundary_condition_surface_elements(bc_ps(i), "ConstantBoundary", "dirichlet", surface_eles)
23782378
call get_boundary_condition(bc_ps(i), 1, surface_mesh = bc_mesh, &
23792379
& surface_element_list = bc_surface_element_list)

diagnostics/Tidal_Diagnostics.F90

+11-11
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ subroutine calculate_free_surface_history(state, s_field)
103103
real :: spin_up_time, current_time, timestep
104104
real, dimension(:), allocatable :: saved_snapshots_times
105105

106-
ewrite(3,*),'in free_surface_history_diagnostics'
106+
ewrite(3,*) 'in free_surface_history_diagnostics'
107107

108108
fs_field => extract_scalar_field(state,"FreeSurface",stat)
109109
call halo_update(fs_field)
@@ -158,13 +158,13 @@ subroutine calculate_free_surface_history(state, s_field)
158158
! Note this is after the options check above as we add options to the tree if
159159
! they aren't there and they are needed in tidal_harmonics diagnostics
160160
if(current_time+timestep<spin_up_time) then
161-
ewrite(4,*), "Still spinning up."
161+
ewrite(4,*) "Still spinning up."
162162
return
163163
endif
164164

165165
! check if we want to save the current timestep at all
166166
if (mod(timestep_counter,stride)/=0) then
167-
ewrite(4,*), "Ignoring this timestep"
167+
ewrite(4,*) "Ignoring this timestep"
168168
return
169169
end if
170170

@@ -181,7 +181,7 @@ subroutine calculate_free_surface_history(state, s_field)
181181
saved_snapshots_times(new_snapshot_index)=current_time+timestep
182182
call set_option(trim(base_path) // "saved_snapshots_times", saved_snapshots_times, stat)
183183
assert(any(stat == (/SPUD_NO_ERROR, SPUD_NEW_KEY_WARNING/)))
184-
ewrite(4,*), 'Filling history level: ', min(timestep_counter/stride+1,levels), '/', levels
184+
ewrite(4,*) 'Filling history level: ', min(timestep_counter/stride+1,levels), '/', levels
185185

186186
! lets copy a snapshot of freesurface to s_field(new_snapshot_index)
187187
hist_fs_field => extract_scalar_field(state,'harmonic'//int2str(new_snapshot_index))
@@ -220,7 +220,7 @@ subroutine calculate_tidal_harmonics(state, s_field)
220220

221221
! Only if Harmonics weren't already calculated in this timestep
222222
if (last_update/=timestep) then
223-
ewrite(3,*), "In tidal_harmonics"
223+
ewrite(3,*) "In tidal_harmonics"
224224
allocate(harmonic_fields(get_number_of_harmonic_fields(state)))
225225
allocate(sigma(nLevels_))
226226

@@ -229,9 +229,9 @@ subroutine calculate_tidal_harmonics(state, s_field)
229229
if (.not. ignoretimestep) then
230230
! Initialize the harmonic fields and frequencies if not already done.
231231
call getHarmonicFields(state, harmonic_fields, nohfs, sigma, M)
232-
ewrite(4,*), 'Frequencies to analyse:'
232+
ewrite(4,*) 'Frequencies to analyse:'
233233
do i=1,M
234-
ewrite(4,*), sigma(i)
234+
ewrite(4,*) sigma(i)
235235
end do
236236
! Calculate harmonics and update (all!) harmonic fields
237237
call update_harmonic_fields(state, saved_snapshots_times, size(saved_snapshots_times), current_snapshot_index, sigma, M, harmonic_fields, nohfs)
@@ -268,12 +268,12 @@ subroutine getFreeSurfaceHistoryData(state, ignoretimestep, saved_snapshots_time
268268
call get_option(trim(free_surface_history_path) // "levels", levels)
269269

270270
if( mod(timestep_counter,stride)/=0) then
271-
ewrite(4,*),'Do nothing in this timestep.'
271+
ewrite(4,*) 'Do nothing in this timestep.'
272272
ignoretimestep=.true.
273273
return
274274
end if
275275
if(timestep_counter/stride+1 .lt. levels) then
276-
ewrite(4,*), 'Do nothing until levels are filled up.'
276+
ewrite(4,*) 'Do nothing until levels are filled up.'
277277
ignoretimestep=.true.
278278
return
279279
end if
@@ -350,8 +350,8 @@ subroutine getHarmonicFields(state, harmonic_fields, nohfs, sigma, M)
350350
end if
351351
end if
352352
end do s_field_loop
353-
ewrite(4,*), 'Found ', nohfs, ' constituents to analyse.'
354-
ewrite(4,*), 'Found ', M, ' frequencies to analyse.'
353+
ewrite(4,*) 'Found ', nohfs, ' constituents to analyse.'
354+
ewrite(4,*) 'Found ', M, ' frequencies to analyse.'
355355

356356
if ( M .le. 0 ) then
357357
FLExit("Internal error in calculate_tidal_harmonics(). No harmonic constituents were found in option tree.")

femtools/Coordinates.F90

+1-1
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ subroutine higher_order_sphere_projection(positions, s_positions)
10041004
type(scalar_field):: radius, s_radius
10051005
real, dimension(positions%dim):: xyz
10061006

1007-
ewrite(1,*), 'In higher_order_sphere_projection'
1007+
ewrite(1,*) 'In higher_order_sphere_projection'
10081008

10091009
call allocate(s_radius, s_positions%mesh, "HigherOrderRadius")
10101010
radius=magnitude(positions)

femtools/Diagnostic_variables.F90

+3-3
Original file line numberDiff line numberDiff line change
@@ -592,13 +592,13 @@ subroutine initialise_diagnostics(filename, state)
592592
if(stat_mesh(mesh)) then
593593
column = column + 1
594594
buffer = field_tag(name = mesh%name, column = column, statistic = "nodes")
595-
write(default_stat%diag_unit, "(a)"), trim(buffer)
595+
write(default_stat%diag_unit, "(a)") trim(buffer)
596596
column = column + 1
597597
buffer = field_tag(name = mesh%name, column = column, statistic = "elements")
598-
write(default_stat%diag_unit, "(a)"), trim(buffer)
598+
write(default_stat%diag_unit, "(a)") trim(buffer)
599599
column = column + 1
600600
buffer = field_tag(name = mesh%name, column = column, statistic = "surface_elements")
601-
write(default_stat%diag_unit, "(a)"), trim(buffer)
601+
write(default_stat%diag_unit, "(a)") trim(buffer)
602602
end if
603603
end do
604604

femtools/Read_GMSH.F90

+2-2
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ subroutine read_nodes_coords( fd, filename, gmshFormat, nodes )
387387

388388
! Skip newline character when in binary mode
389389
if( gmshFormat == binaryFormat ) then
390-
read(fd), newlineChar
390+
read(fd) newlineChar
391391
call ascii_formatting(fd, filename, "read")
392392
end if
393393

@@ -477,7 +477,7 @@ subroutine read_node_column_IDs( fd, filename, gmshFormat, nodes )
477477

478478
! Skip newline character when in binary mode
479479
if( gmshFormat == binaryFormat ) then
480-
read(fd), newlineChar
480+
read(fd) newlineChar
481481
call ascii_formatting(fd, filename, "read")
482482
end if
483483

ocean_forcing/FluxesReader.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -438,11 +438,11 @@ int FluxesReader::Read(int time_index){
438438

439439
short fill_value;
440440
err = nc_get_att_short(ncid, id, "_FillValue", &fill_value);
441-
if (err != NC_NOERR) fill_value = std::numeric_limits<double>::quiet_NaN();
441+
if (err != NC_NOERR) fill_value = std::numeric_limits<short>::quiet_NaN();
442442

443443
short missing_value;
444444
err = nc_get_att_short(ncid, id, "missing_value", &missing_value);
445-
if (err != NC_NOERR) missing_value = std::numeric_limits<double>::quiet_NaN();
445+
if (err != NC_NOERR) missing_value = std::numeric_limits<short>::quiet_NaN();
446446

447447
if(verbose){
448448
cout<<*ifield<<" scale_factor = "<<scale_factor<<endl

0 commit comments

Comments
 (0)