From 8a4f281293a1b6fd548772f971fc54f20b08cf97 Mon Sep 17 00:00:00 2001 From: jiandewang Date: Mon, 4 Mar 2024 22:50:18 -0500 Subject: [PATCH] remove compiling warning --- .../GFDL_ocean_BGC/FMS_coupler_util.F90 | 2 +- .../GFDL_ocean_BGC/generic_tracer_utils.F90 | 36 +++++++++---------- .../database_client_interface.F90 | 28 +++++++-------- src/ALE/MOM_remapping.F90 | 6 ++-- src/core/MOM_open_boundary.F90 | 2 +- src/framework/MOM_io_file.F90 | 4 +-- src/framework/posix.F90 | 2 +- 7 files changed, 40 insertions(+), 40 deletions(-) diff --git a/config_src/external/GFDL_ocean_BGC/FMS_coupler_util.F90 b/config_src/external/GFDL_ocean_BGC/FMS_coupler_util.F90 index b7ee7de684..fb9bf7aad0 100644 --- a/config_src/external/GFDL_ocean_BGC/FMS_coupler_util.F90 +++ b/config_src/external/GFDL_ocean_BGC/FMS_coupler_util.F90 @@ -13,7 +13,7 @@ subroutine extract_coupler_values(BC_struc, BC_index, BC_element, array_out, ilb is, ie, js, je, conversion) integer, intent(in) :: ilb !< Lower bounds integer, intent(in) :: jlb !< Lower bounds - real, dimension(ilb:,jlb:),intent(out) :: array_out !< The array being filled with the input values + real, dimension(ilb:,jlb:),intent(inout) :: array_out !< The array being filled with the input values type(coupler_2d_bc_type), intent(in) :: BC_struc !< The type from which the data is being extracted integer, intent(in) :: BC_index !< The boundary condition number being extracted integer, intent(in) :: BC_element !< The element of the boundary condition being extracted diff --git a/config_src/external/GFDL_ocean_BGC/generic_tracer_utils.F90 b/config_src/external/GFDL_ocean_BGC/generic_tracer_utils.F90 index ea9f225a27..e2637e8505 100644 --- a/config_src/external/GFDL_ocean_BGC/generic_tracer_utils.F90 +++ b/config_src/external/GFDL_ocean_BGC/generic_tracer_utils.F90 @@ -127,16 +127,16 @@ end subroutine g_tracer_set_common subroutine g_tracer_get_common(isc,iec,jsc,jec,isd,ied,jsd,jed,nk,ntau,& axes,grid_tmask,grid_mask_coast,grid_kmt,init_time,diag_CS) - integer, intent(out) :: isc !< Computation start index in i direction - integer, intent(out) :: iec !< Computation end index in i direction - integer, intent(out) :: jsc !< Computation start index in j direction - integer, intent(out) :: jec !< Computation end index in j direction - integer, intent(out) :: isd !< Data start index in i direction - integer, intent(out) :: ied !< Data end index in i direction - integer, intent(out) :: jsd !< Data start index in j direction - integer, intent(out) :: jed !< Data end index in j direction - integer, intent(out) :: nk !< Number of levels in k direction - integer, intent(out) :: ntau !< Unknown + integer, intent(inout) :: isc !< Computation start index in i direction + integer, intent(inout) :: iec !< Computation end index in i direction + integer, intent(inout) :: jsc !< Computation start index in j direction + integer, intent(inout) :: jec !< Computation end index in j direction + integer, intent(inout) :: isd !< Data start index in i direction + integer, intent(inout) :: ied !< Data end index in i direction + integer, intent(inout) :: jsd !< Data start index in j direction + integer, intent(inout) :: jed !< Data end index in j direction + integer, intent(inout) :: nk !< Number of levels in k direction + integer, intent(inout) :: ntau !< Unknown integer, optional, intent(out) :: axes(3) !< Unknown type(time_type), optional, intent(out) :: init_time !< Unknown real, optional, dimension(:,:,:), pointer :: grid_tmask !< Unknown @@ -176,7 +176,7 @@ subroutine g_tracer_get_4D_val(g_tracer_list,name,member,array,isd,jsd) type(g_tracer_type), pointer :: g_tracer_list !< Unknown integer, intent(in) :: isd !< Unknown integer, intent(in) :: jsd !< Unknown - real, dimension(isd:,jsd:,:,:), intent(out):: array !< Unknown + real, dimension(isd:,jsd:,:,:), intent(inout):: array !< Unknown end subroutine g_tracer_get_4D_val !> Unknown @@ -188,7 +188,7 @@ subroutine g_tracer_get_3D_val(g_tracer_list,name,member,array,isd,jsd,ntau,posi integer, intent(in) :: jsd !< Unknown integer, optional, intent(in) :: ntau !< Unknown logical, optional, intent(in) :: positive !< Unknown - real, dimension(isd:,jsd:,:), intent(out):: array !< Unknown + real, dimension(isd:,jsd:,:), intent(inout):: array !< Unknown character(len=fm_string_len), parameter :: sub_name = 'g_tracer_get_3D_val' end subroutine g_tracer_get_3D_val @@ -199,7 +199,7 @@ subroutine g_tracer_get_2D_val(g_tracer_list,name,member,array,isd,jsd) type(g_tracer_type), pointer :: g_tracer_list !< Unknown integer, intent(in) :: isd !< Unknown integer, intent(in) :: jsd !< Unknown - real, dimension(isd:,jsd:), intent(out):: array !< Unknown + real, dimension(isd:,jsd:), intent(inout):: array !< Unknown end subroutine g_tracer_get_2D_val !> Unknown @@ -207,7 +207,7 @@ subroutine g_tracer_get_real(g_tracer_list,name,member,value) character(len=*), intent(in) :: name !< Unknown character(len=*), intent(in) :: member !< Unknown type(g_tracer_type), pointer :: g_tracer_list !< Unknown - real, intent(out):: value !< Unknown + real, intent(inout):: value !< Unknown end subroutine g_tracer_get_real !> Unknown @@ -215,7 +215,7 @@ subroutine g_tracer_get_string(g_tracer_list,name,member,string) character(len=*), intent(in) :: name !< Unknown character(len=*), intent(in) :: member !< Unknown type(g_tracer_type), pointer :: g_tracer_list !< Unknown - character(len=fm_string_len), intent(out) :: string !< Unknown + character(len=fm_string_len), intent(inout) :: string !< Unknown end subroutine g_tracer_get_string !> Unknown @@ -267,13 +267,13 @@ end subroutine g_tracer_send_diag !> Unknown subroutine g_tracer_get_name(g_tracer,string) type(g_tracer_type), pointer :: g_tracer !< Unknown - character(len=*), intent(out) :: string !< Unknown + character(len=*), intent(inout) :: string !< Unknown end subroutine g_tracer_get_name !> Unknown subroutine g_tracer_get_alias(g_tracer,string) type(g_tracer_type), pointer :: g_tracer !< Unknown - character(len=*), intent(out) :: string !< Unknown + character(len=*), intent(inout) :: string !< Unknown end subroutine g_tracer_get_alias !> Is the tracer prognostic? @@ -292,7 +292,7 @@ end subroutine g_tracer_get_next subroutine g_tracer_get_obc_segment_props(g_tracer_list, name, obc_has, src_file, src_var_name,lfac_in,lfac_out) type(g_tracer_type), pointer :: g_tracer_list !< pointer to the head of the generic tracer list character(len=*), intent(in) :: name !< tracer name - logical, intent(out):: obc_has !< .true. if This tracer has OBC + logical, intent(inout):: obc_has !< .true. if This tracer has OBC real, optional,intent(out):: lfac_in !< OBC reservoir inverse lengthscale factor real, optional,intent(out):: lfac_out !< OBC reservoir inverse lengthscale factor character(len=*),optional,intent(out):: src_file !< OBC source file diff --git a/config_src/external/database_comms/database_client_interface.F90 b/config_src/external/database_comms/database_client_interface.F90 index 9b57628921..0459ea6139 100644 --- a/config_src/external/database_comms/database_client_interface.F90 +++ b/config_src/external/database_comms/database_client_interface.F90 @@ -310,7 +310,7 @@ end function put_tensor_int32_4d !> Unpack a 32-bit real 1d tensor from the database function unpack_tensor_float_1d(self, name, data, dims) result(code) - real(kind=real32), dimension(:), intent( out) :: data !< Data to be received + real(kind=real32), dimension(:), intent(inout) :: data !< Data to be received class(dbclient_type), intent(in) :: self !< Fortran communication client character(len=*), intent(in) :: name !< The unique name used to store in the database integer, dimension(:), intent(in) :: dims !< The length of each dimension @@ -321,7 +321,7 @@ end function unpack_tensor_float_1d !> Unpack a 32-bit real 2d tensor from the database function unpack_tensor_float_2d(self, name, data, dims) result(code) - real(kind=real32), dimension(:,:), intent( out) :: data !< Data to be received + real(kind=real32), dimension(:,:), intent(inout) :: data !< Data to be received class(dbclient_type), intent(in) :: self !< Fortran communication client character(len=*), intent(in) :: name !< The unique name used to store in the database integer, dimension(:), intent(in) :: dims !< The length of each dimension @@ -332,7 +332,7 @@ end function unpack_tensor_float_2d !> Unpack a 32-bit real 3d tensor from the database function unpack_tensor_float_3d(self, name, data, dims) result(code) - real(kind=real32), dimension(:,:,:), intent( out) :: data !< Data to be received + real(kind=real32), dimension(:,:,:), intent(inout) :: data !< Data to be received class(dbclient_type), intent(in) :: self !< Fortran communication client character(len=*), intent(in) :: name !< The unique name used to store in the database integer, dimension(:), intent(in) :: dims !< The length of each dimension @@ -343,7 +343,7 @@ end function unpack_tensor_float_3d !> Unpack a 32-bit real 4d tensor from the database function unpack_tensor_float_4d(self, name, data, dims) result(code) - real(kind=real32), dimension(:,:,:,:), intent( out) :: data !< Data to be received + real(kind=real32), dimension(:,:,:,:), intent(inout) :: data !< Data to be received class(dbclient_type), intent(in) :: self !< Fortran communication client character(len=*), intent(in) :: name !< The unique name used to store in the database integer, dimension(:), intent(in) :: dims !< The length of each dimension @@ -354,7 +354,7 @@ end function unpack_tensor_float_4d !> Unpack a 64-bit real 1d tensor from the database function unpack_tensor_double_1d(self, name, data, dims) result(code) - real(kind=real64), dimension(:), intent( out) :: data !< Data to be received + real(kind=real64), dimension(:), intent(inout) :: data !< Data to be received class(dbclient_type), intent(in) :: self !< Fortran communication client character(len=*), intent(in) :: name !< The unique name used to store in the database integer, dimension(:), intent(in) :: dims !< The length of each dimension @@ -365,7 +365,7 @@ end function unpack_tensor_double_1d !> Unpack a 64-bit real 2d tensor from the database function unpack_tensor_double_2d(self, name, data, dims) result(code) - real(kind=real64), dimension(:,:), intent( out) :: data !< Data to be received + real(kind=real64), dimension(:,:), intent(inout) :: data !< Data to be received class(dbclient_type), intent(in) :: self !< Fortran communication client character(len=*), intent(in) :: name !< The unique name used to store in the database integer, dimension(:), intent(in) :: dims !< The length of each dimension @@ -376,7 +376,7 @@ end function unpack_tensor_double_2d !> Unpack a 64-bit real 3d tensor from the database function unpack_tensor_double_3d(self, name, data, dims) result(code) - real(kind=real64), dimension(:,:,:), intent( out) :: data !< Data to be received + real(kind=real64), dimension(:,:,:), intent(inout) :: data !< Data to be received class(dbclient_type), intent(in) :: self !< Fortran communication client character(len=*), intent(in) :: name !< The unique name used to store in the database integer, dimension(:), intent(in) :: dims !< The length of each dimension @@ -387,7 +387,7 @@ end function unpack_tensor_double_3d !> Unpack a 64-bit real 4d tensor from the database function unpack_tensor_double_4d(self, name, data, dims) result(code) - real(kind=real64), dimension(:,:,:,:), intent( out) :: data !< Data to be received + real(kind=real64), dimension(:,:,:,:), intent(inout) :: data !< Data to be received class(dbclient_type), intent(in) :: self !< Fortran communication client character(len=*), intent(in) :: name !< The unique name used to store in the database integer, dimension(:), intent(in) :: dims !< The length of each dimension @@ -398,7 +398,7 @@ end function unpack_tensor_double_4d !> Unpack a 32-bit integer 1d tensor from the database function unpack_tensor_int32_1d(self, name, data, dims) result(code) - integer(kind=int32), dimension(:), intent( out) :: data !< Data to be received + integer(kind=int32), dimension(:), intent(inout) :: data !< Data to be received class(dbclient_type), intent(in) :: self !< Fortran communication client character(len=*), intent(in) :: name !< The unique name used to store in the database integer, dimension(:), intent(in) :: dims !< The length of each dimension @@ -409,7 +409,7 @@ end function unpack_tensor_int32_1d !> Unpack a 32-bit integer 2d tensor from the database function unpack_tensor_int32_2d(self, name, data, dims) result(code) - integer(kind=int32), dimension(:,:), intent( out) :: data !< Data to be received + integer(kind=int32), dimension(:,:), intent(inout) :: data !< Data to be received class(dbclient_type), intent(in) :: self !< Fortran communication client character(len=*), intent(in) :: name !< The unique name used to store in the database integer, dimension(:), intent(in) :: dims !< The length of each dimension @@ -420,7 +420,7 @@ end function unpack_tensor_int32_2d !> Unpack a 32-bit integer 3d tensor from the database function unpack_tensor_int32_3d(self, name, data, dims) result(code) - integer(kind=int32), dimension(:,:,:), intent( out) :: data !< Data to be received + integer(kind=int32), dimension(:,:,:), intent(inout) :: data !< Data to be received class(dbclient_type), intent(in) :: self !< Fortran communication client character(len=*), intent(in) :: name !< The unique name used to store in the database integer, dimension(:), intent(in) :: dims !< The length of each dimension @@ -431,7 +431,7 @@ end function unpack_tensor_int32_3d !> Unpack a 32-bit integer 4d tensor from the database function unpack_tensor_int32_4d(self, name, data, dims) result(code) - integer(kind=int32), dimension(:,:,:,:), intent( out) :: data !< Data to be received + integer(kind=int32), dimension(:,:,:,:), intent(inout) :: data !< Data to be received class(dbclient_type), intent(in) :: self !< Fortran communication client character(len=*), intent(in) :: name !< The unique name used to store in the database integer, dimension(:), intent(in) :: dims !< The length of each dimension @@ -475,7 +475,7 @@ end function copy_tensor function get_model(self, name, model) result(code) class(dbclient_type), intent(in ) :: self !< An initialized communication client character(len=*), intent(in ) :: name !< The name associated with the model - character(len=*), intent( out) :: model !< The model as a continuous buffer + character(len=*), intent(inout) :: model !< The model as a continuous buffer integer :: code code = -1 @@ -617,7 +617,7 @@ end function delete_model_multigpu function get_script(self, name, script) result(code) class(dbclient_type), intent(in ) :: self !< An initialized communication client character(len=*), intent(in ) :: name !< The name to use to place the script - character(len=*), intent( out) :: script !< The script as a continuous buffer + character(len=*), intent(inout) :: script !< The script as a continuous buffer integer :: code code = -1 diff --git a/src/ALE/MOM_remapping.F90 b/src/ALE/MOM_remapping.F90 index eeb4590a08..99538a9230 100644 --- a/src/ALE/MOM_remapping.F90 +++ b/src/ALE/MOM_remapping.F90 @@ -393,9 +393,9 @@ subroutine check_reconstructions_1d(n0, h0, u0, deg, boundary_extrapolation, & real, dimension(n0), intent(in) :: u0 !< Cell averages on source grid [A] integer, intent(in) :: deg !< Degree of polynomial reconstruction logical, intent(in) :: boundary_extrapolation !< Extrapolate at boundaries if true - real, dimension(n0,deg+1),intent(out) :: ppoly_r_coefs !< Coefficients of polynomial [A] - real, dimension(n0,2), intent(out) :: ppoly_r_E !< Edge value of polynomial [A] - real, dimension(n0,2), intent(out) :: ppoly_r_S !< Edge slope of polynomial [A H-1] + real, dimension(n0,deg+1),intent(inout) :: ppoly_r_coefs !< Coefficients of polynomial [A] + real, dimension(n0,2), intent(inout) :: ppoly_r_E !< Edge value of polynomial [A] + real, dimension(n0,2), intent(inout) :: ppoly_r_S !< Edge slope of polynomial [A H-1] ! Local variables integer :: i0, n real :: u_l, u_c, u_r ! Cell averages [A] diff --git a/src/core/MOM_open_boundary.F90 b/src/core/MOM_open_boundary.F90 index 7bfb6479b2..6fb8d65e0c 100644 --- a/src/core/MOM_open_boundary.F90 +++ b/src/core/MOM_open_boundary.F90 @@ -854,7 +854,7 @@ subroutine initialize_segment_data(G, GV, US, OBC, PF) ! if (siz(4) == 1) segment%values_needed = .false. if (segment%on_pe) then if (OBC%brushcutter_mode .and. (modulo(siz(1),2) == 0 .or. modulo(siz(2),2) == 0)) then - write(mesg,'("Brushcutter mode sizes ", I6, I6))') siz(1), siz(2) + write(mesg,'("Brushcutter mode sizes ",I6,I6))') siz(1), siz(2) call MOM_error(WARNING, mesg // " " // trim(filename) // " " // trim(fieldname)) call MOM_error(FATAL,'segment data are not on the supergrid') endif diff --git a/src/framework/MOM_io_file.F90 b/src/framework/MOM_io_file.F90 index 6eaa10f622..6b69752134 100644 --- a/src/framework/MOM_io_file.F90 +++ b/src/framework/MOM_io_file.F90 @@ -1696,9 +1696,9 @@ subroutine read_field_chksum_nc(handle, field, chksum, valid_chksum) !< File where field is stored type(MOM_field), intent(in) :: field !< The field whose checksum attribute is to be read - integer(kind=int64), intent(out) :: chksum + integer(kind=int64), intent(inout) :: chksum !< The checksum for the field. - logical, intent(out) :: valid_chksum + logical, intent(inout) :: valid_chksum !< If true, chksum has been successfully read call MOM_error(FATAL, 'read_field_chksum over netCDF is not yet implemented.') diff --git a/src/framework/posix.F90 b/src/framework/posix.F90 index fffb619cba..adad4005f8 100644 --- a/src/framework/posix.F90 +++ b/src/framework/posix.F90 @@ -302,7 +302,7 @@ end function mkdir function stat(path, buf) result(rc) character(len=*), intent(in) :: path !< Pathname of file to be inspected - type(stat_buf), intent(out) :: buf + type(stat_buf), intent(inout) :: buf !< Buffer containing information about the file if it exists ! NOTE: Currently the contents of buf are not readable, but we could move ! the contents into a readable Fortran type.