Skip to content

Commit e253883

Browse files
committed
Merge branch 'main' into dev/gfdl
2 parents 0c790f2 + 129e1bd commit e253883

File tree

7 files changed

+59
-7
lines changed

7 files changed

+59
-7
lines changed

config_src/external/GFDL_ocean_BGC/FMS_coupler_util.F90

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ subroutine extract_coupler_values(BC_struc, BC_index, BC_element, array_out, ilb
2222
integer, optional, intent(in) :: js !< The j- limits of array_out to be filled
2323
integer, optional, intent(in) :: je !< The j- limits of array_out to be filled
2424
real, optional, intent(in) :: conversion !< A number that every element is multiplied by
25+
26+
array_out(:,:) = -1.
2527
end subroutine extract_coupler_values
2628

2729
!> Set element and index of a boundary condition

config_src/external/GFDL_ocean_BGC/generic_tracer_utils.F90

+29
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,17 @@ subroutine g_tracer_get_common(isc,iec,jsc,jec,isd,ied,jsd,jed,nk,ntau,&
143143
integer, optional, dimension(:,:), pointer :: grid_mask_coast !< Unknown
144144
integer, optional, dimension(:,:), pointer :: grid_kmt !< Unknown
145145
type(g_diag_ctrl), optional, pointer :: diag_CS !< Unknown
146+
147+
isc = -1
148+
iec = -1
149+
jsc = -1
150+
jec = -1
151+
isd = -1
152+
ied = -1
153+
jsd = -1
154+
jed = -1
155+
nk = -1
156+
ntau = -1
146157
end subroutine g_tracer_get_common
147158

148159
!> Unknown
@@ -177,6 +188,8 @@ subroutine g_tracer_get_4D_val(g_tracer_list,name,member,array,isd,jsd)
177188
integer, intent(in) :: isd !< Unknown
178189
integer, intent(in) :: jsd !< Unknown
179190
real, dimension(isd:,jsd:,:,:), intent(out):: array !< Unknown
191+
192+
array(:,:,:,:) = -1.
180193
end subroutine g_tracer_get_4D_val
181194

182195
!> Unknown
@@ -190,6 +203,8 @@ subroutine g_tracer_get_3D_val(g_tracer_list,name,member,array,isd,jsd,ntau,posi
190203
logical, optional, intent(in) :: positive !< Unknown
191204
real, dimension(isd:,jsd:,:), intent(out):: array !< Unknown
192205
character(len=fm_string_len), parameter :: sub_name = 'g_tracer_get_3D_val'
206+
207+
array(:,:,:) = -1.
193208
end subroutine g_tracer_get_3D_val
194209

195210
!> Unknown
@@ -200,6 +215,8 @@ subroutine g_tracer_get_2D_val(g_tracer_list,name,member,array,isd,jsd)
200215
integer, intent(in) :: isd !< Unknown
201216
integer, intent(in) :: jsd !< Unknown
202217
real, dimension(isd:,jsd:), intent(out):: array !< Unknown
218+
219+
array(:,:) = -1.
203220
end subroutine g_tracer_get_2D_val
204221

205222
!> Unknown
@@ -208,6 +225,8 @@ subroutine g_tracer_get_real(g_tracer_list,name,member,value)
208225
character(len=*), intent(in) :: member !< Unknown
209226
type(g_tracer_type), pointer :: g_tracer_list !< Unknown
210227
real, intent(out):: value !< Unknown
228+
229+
value = -1
211230
end subroutine g_tracer_get_real
212231

213232
!> Unknown
@@ -216,6 +235,8 @@ subroutine g_tracer_get_string(g_tracer_list,name,member,string)
216235
character(len=*), intent(in) :: member !< Unknown
217236
type(g_tracer_type), pointer :: g_tracer_list !< Unknown
218237
character(len=fm_string_len), intent(out) :: string !< Unknown
238+
239+
string = ""
219240
end subroutine g_tracer_get_string
220241

221242
!> Unknown
@@ -268,18 +289,24 @@ end subroutine g_tracer_send_diag
268289
subroutine g_tracer_get_name(g_tracer,string)
269290
type(g_tracer_type), pointer :: g_tracer !< Unknown
270291
character(len=*), intent(out) :: string !< Unknown
292+
293+
string = ""
271294
end subroutine g_tracer_get_name
272295

273296
!> Unknown
274297
subroutine g_tracer_get_alias(g_tracer,string)
275298
type(g_tracer_type), pointer :: g_tracer !< Unknown
276299
character(len=*), intent(out) :: string !< Unknown
300+
301+
string = ""
277302
end subroutine g_tracer_get_alias
278303

279304
!> Is the tracer prognostic?
280305
function g_tracer_is_prog(g_tracer)
281306
logical :: g_tracer_is_prog
282307
type(g_tracer_type), pointer :: g_tracer !< Pointer to tracer node
308+
309+
g_tracer_is_prog = .false.
283310
end function g_tracer_is_prog
284311

285312
!> get the next tracer in the list
@@ -297,6 +324,8 @@ subroutine g_tracer_get_obc_segment_props(g_tracer_list, name, obc_has, src_file
297324
real, optional,intent(out):: lfac_out !< OBC reservoir inverse lengthscale factor
298325
character(len=*),optional,intent(out):: src_file !< OBC source file
299326
character(len=*),optional,intent(out):: src_var_name !< OBC source variable in file
327+
328+
obc_has = .false.
300329
end subroutine g_tracer_get_obc_segment_props
301330

302331
!>Vertical Diffusion of a tracer node

config_src/external/database_comms/database_client_interface.F90

+19
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ function unpack_tensor_float_1d(self, name, data, dims) result(code)
317317
integer :: code
318318

319319
code = -1
320+
data(:) = -1.
320321
end function unpack_tensor_float_1d
321322

322323
!> Unpack a 32-bit real 2d tensor from the database
@@ -328,6 +329,7 @@ function unpack_tensor_float_2d(self, name, data, dims) result(code)
328329
integer :: code
329330

330331
code = -1
332+
data(:,:) = -1.
331333
end function unpack_tensor_float_2d
332334

333335
!> Unpack a 32-bit real 3d tensor from the database
@@ -339,6 +341,7 @@ function unpack_tensor_float_3d(self, name, data, dims) result(code)
339341
integer :: code
340342

341343
code = -1
344+
data(:,:,:) = -1.
342345
end function unpack_tensor_float_3d
343346

344347
!> Unpack a 32-bit real 4d tensor from the database
@@ -350,6 +353,7 @@ function unpack_tensor_float_4d(self, name, data, dims) result(code)
350353
integer :: code
351354

352355
code = -1
356+
data(:,:,:,:) = -1.
353357
end function unpack_tensor_float_4d
354358

355359
!> Unpack a 64-bit real 1d tensor from the database
@@ -361,6 +365,7 @@ function unpack_tensor_double_1d(self, name, data, dims) result(code)
361365
integer :: code
362366

363367
code = -1
368+
data(:) = -1.
364369
end function unpack_tensor_double_1d
365370

366371
!> Unpack a 64-bit real 2d tensor from the database
@@ -372,6 +377,7 @@ function unpack_tensor_double_2d(self, name, data, dims) result(code)
372377
integer :: code
373378

374379
code = -1
380+
data(:,:) = -1.
375381
end function unpack_tensor_double_2d
376382

377383
!> Unpack a 64-bit real 3d tensor from the database
@@ -383,6 +389,7 @@ function unpack_tensor_double_3d(self, name, data, dims) result(code)
383389
integer :: code
384390

385391
code = -1
392+
data(:,:,:) = -1.
386393
end function unpack_tensor_double_3d
387394

388395
!> Unpack a 64-bit real 4d tensor from the database
@@ -394,6 +401,7 @@ function unpack_tensor_double_4d(self, name, data, dims) result(code)
394401
integer :: code
395402

396403
code = -1
404+
data(:,:,:,:) = -1.
397405
end function unpack_tensor_double_4d
398406

399407
!> Unpack a 32-bit integer 1d tensor from the database
@@ -405,6 +413,7 @@ function unpack_tensor_int32_1d(self, name, data, dims) result(code)
405413
integer :: code
406414

407415
code = -1
416+
data(:) = -1_int32
408417
end function unpack_tensor_int32_1d
409418

410419
!> Unpack a 32-bit integer 2d tensor from the database
@@ -416,6 +425,7 @@ function unpack_tensor_int32_2d(self, name, data, dims) result(code)
416425
integer :: code
417426

418427
code = -1
428+
data(:,:) = -1_int32
419429
end function unpack_tensor_int32_2d
420430

421431
!> Unpack a 32-bit integer 3d tensor from the database
@@ -427,6 +437,7 @@ function unpack_tensor_int32_3d(self, name, data, dims) result(code)
427437
integer :: code
428438

429439
code = -1
440+
data(:,:,:) = -1_int32
430441
end function unpack_tensor_int32_3d
431442

432443
!> Unpack a 32-bit integer 4d tensor from the database
@@ -438,6 +449,7 @@ function unpack_tensor_int32_4d(self, name, data, dims) result(code)
438449
integer :: code
439450

440451
code = -1
452+
data(:,:,:,:) = -1_int32
441453
end function unpack_tensor_int32_4d
442454

443455
!> Move a tensor to a new name
@@ -479,6 +491,7 @@ function get_model(self, name, model) result(code)
479491
integer :: code
480492

481493
code = -1
494+
model = ""
482495
end function get_model
483496

484497
!> Load the machine learning model from a file and set the configuration
@@ -621,6 +634,7 @@ function get_script(self, name, script) result(code)
621634
integer :: code
622635

623636
code = -1
637+
script = ""
624638
end function get_script
625639

626640
!> Set a script (from file) in the database for future execution
@@ -735,7 +749,12 @@ function get_dataset(self, name, dataset) result(code)
735749
type(dataset_type), intent( out) :: dataset !< receives the dataset
736750
integer :: code
737751

752+
type(dataset_type) :: dataset_out
753+
! Placeholder dataset to prevent compiler warnings
754+
! Since dataset_type contains no data, any declared instance should work.
755+
738756
code = -1
757+
dataset = dataset_out
739758
end function get_dataset
740759

741760
!> Rename a dataset stored in the database

src/ALE/MOM_remapping.F90

+3-3
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,9 @@ subroutine check_reconstructions_1d(n0, h0, u0, deg, boundary_extrapolation, &
393393
real, dimension(n0), intent(in) :: u0 !< Cell averages on source grid [A]
394394
integer, intent(in) :: deg !< Degree of polynomial reconstruction
395395
logical, intent(in) :: boundary_extrapolation !< Extrapolate at boundaries if true
396-
real, dimension(n0,deg+1),intent(out) :: ppoly_r_coefs !< Coefficients of polynomial [A]
397-
real, dimension(n0,2), intent(out) :: ppoly_r_E !< Edge value of polynomial [A]
398-
real, dimension(n0,2), intent(out) :: ppoly_r_S !< Edge slope of polynomial [A H-1]
396+
real, dimension(n0,deg+1),intent(in) :: ppoly_r_coefs !< Coefficients of polynomial [A]
397+
real, dimension(n0,2), intent(in) :: ppoly_r_E !< Edge value of polynomial [A]
398+
real, dimension(n0,2), intent(in) :: ppoly_r_S !< Edge slope of polynomial [A H-1]
399399
! Local variables
400400
integer :: i0, n
401401
real :: u_l, u_c, u_r ! Cell averages [A]

src/framework/MOM_io_file.F90

+2
Original file line numberDiff line numberDiff line change
@@ -1709,6 +1709,8 @@ subroutine read_field_chksum_nc(handle, field, chksum, valid_chksum)
17091709
!< If true, chksum has been successfully read
17101710

17111711
call MOM_error(FATAL, 'read_field_chksum over netCDF is not yet implemented.')
1712+
chksum = -1_int64
1713+
valid_chksum = .false.
17121714
end subroutine read_field_chksum_nc
17131715

17141716

src/framework/posix.F90

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function stat_posix(path, buf) result(rc) bind(c, name="stat")
8484

8585
character(kind=c_char), dimension(*), intent(in) :: path
8686
!< Pathname of a POSIX file
87-
type(stat_buf), intent(in) :: buf
87+
type(stat_buf), intent(inout) :: buf
8888
!< Information describing the file if it exists
8989
integer(kind=c_int) :: rc
9090
!< Function return code

src/ice_shelf/MOM_ice_shelf_diag_mediator.F90

+3-3
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,9 @@ function register_MOM_IS_diag_field(module_name, field_name, axes, init_time, &
514514
end function register_MOM_IS_diag_field
515515

516516
!> Registers a static diagnostic, returning an integer handle
517-
integer function register_MOM_IS_static_field(module_name, field_name, axes, &
518-
long_name, units, missing_value, range, mask_variant, standard_name, &
519-
do_not_log, interp_method, tile_count)
517+
function register_MOM_IS_static_field(module_name, field_name, axes, &
518+
long_name, units, missing_value, range, mask_variant, standard_name, &
519+
do_not_log, interp_method, tile_count) result(register_static_field)
520520
integer :: register_static_field !< The returned diagnostic handle
521521
character(len=*), intent(in) :: module_name !< Name of this module, usually "ice_model"
522522
character(len=*), intent(in) :: field_name !< Name of the diagnostic field

0 commit comments

Comments
 (0)