diff --git a/CMakeLists.txt b/CMakeLists.txt index 4278cc9f8..6a0d1a345 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,7 +74,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -fbacktrace") if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz") + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-invalid-boz") endif() set(CMAKE_Fortran_FLAGS_RELEASE "-O3") set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -ggdb -Wall -fcheck=all") diff --git a/sorc/chgres_cube.fd/CMakeLists.txt b/sorc/chgres_cube.fd/CMakeLists.txt index e7e3c49cd..53fe3644d 100644 --- a/sorc/chgres_cube.fd/CMakeLists.txt +++ b/sorc/chgres_cube.fd/CMakeLists.txt @@ -29,11 +29,6 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -assume byterecl") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -fdefault-real-8") - - # Turn on this argument mismatch flag for gfortran10. - if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") - endif() endif() set(exe_name chgres_cube) diff --git a/sorc/chgres_cube.fd/atm_input_data.F90 b/sorc/chgres_cube.fd/atm_input_data.F90 index bcb0e3782..7d995ee0a 100644 --- a/sorc/chgres_cube.fd/atm_input_data.F90 +++ b/sorc/chgres_cube.fd/atm_input_data.F90 @@ -1294,7 +1294,7 @@ end subroutine read_input_atm_restart_file !! @author George Gayno NCEP/EMC subroutine read_input_atm_gaussian_netcdf_file(localpet) - use mpi + use mpi_f08 implicit none @@ -1678,7 +1678,7 @@ end subroutine read_input_atm_gaussian_netcdf_file !! @author George Gayno NCEP/EMC subroutine read_input_atm_tiled_history_file(localpet) - use mpi + use mpi_f08 implicit none @@ -1969,7 +1969,7 @@ end subroutine read_input_atm_tiled_history_file !! @author George Gayno NCEP/EMC subroutine read_input_atm_grib2_file(localpet) - use mpi + use mpi_f08 use grib_mod use grib2_util, only : rh2spfh, rh2spfh_gfs, convert_omega diff --git a/sorc/chgres_cube.fd/atmosphere.F90 b/sorc/chgres_cube.fd/atmosphere.F90 index 68281e94c..c13e709b6 100644 --- a/sorc/chgres_cube.fd/atmosphere.F90 +++ b/sorc/chgres_cube.fd/atmosphere.F90 @@ -117,7 +117,7 @@ module atmosphere !! @author George Gayno subroutine atmosphere_driver(localpet) - use mpi + use mpi_f08 implicit none @@ -1761,7 +1761,7 @@ END SUBROUTINE VINTG_WAM !! !! @author Mark Iredell @date 92-10-31 SUBROUTINE VINTG - use mpi + use mpi_f08 IMPLICIT NONE diff --git a/sorc/chgres_cube.fd/chgres.F90 b/sorc/chgres_cube.fd/chgres.F90 index 8b01656f2..ba1a0394c 100644 --- a/sorc/chgres_cube.fd/chgres.F90 +++ b/sorc/chgres_cube.fd/chgres.F90 @@ -23,7 +23,7 @@ !! @return 0 for success, error code otherwise. program chgres - use mpi + use mpi_f08 use esmf use atmosphere, only : atmosphere_driver diff --git a/sorc/chgres_cube.fd/msis2.1.fd/msis_init.F90 b/sorc/chgres_cube.fd/msis2.1.fd/msis_init.F90 index e6dd54b25..5f4da6f25 100644 --- a/sorc/chgres_cube.fd/msis2.1.fd/msis_init.F90 +++ b/sorc/chgres_cube.fd/msis2.1.fd/msis_init.F90 @@ -370,7 +370,7 @@ end subroutine initparmspace !================================================================================================== subroutine loadparmset(name,iun) - use mpi + use mpi_f08 use msis_constants, only : maxnbf, csfxmod diff --git a/sorc/chgres_cube.fd/search_util.F90 b/sorc/chgres_cube.fd/search_util.F90 index fbab5e209..fbafcda32 100644 --- a/sorc/chgres_cube.fd/search_util.F90 +++ b/sorc/chgres_cube.fd/search_util.F90 @@ -45,7 +45,7 @@ module search_util !! @author George Gayno NCEP/EMC subroutine search (field, mask, idim, jdim, tile, field_num, latitude, terrain_land, soilt_climo) - use mpi + use mpi_f08 use esmf implicit none diff --git a/sorc/chgres_cube.fd/sfc_input_data.F90 b/sorc/chgres_cube.fd/sfc_input_data.F90 index 4ea4d7629..c5d5d7c0f 100644 --- a/sorc/chgres_cube.fd/sfc_input_data.F90 +++ b/sorc/chgres_cube.fd/sfc_input_data.F90 @@ -1762,7 +1762,7 @@ end subroutine read_input_sfc_netcdf_file !! @author Larissa Reames subroutine read_input_sfc_grib2_file(localpet) - use mpi + use mpi_f08 use grib_mod use program_setup, only : vgtyp_from_climo, sotyp_from_climo use model_grid, only : input_grid_type diff --git a/sorc/chgres_cube.fd/surface.F90 b/sorc/chgres_cube.fd/surface.F90 index b77f83f80..37ef6dc61 100644 --- a/sorc/chgres_cube.fd/surface.F90 +++ b/sorc/chgres_cube.fd/surface.F90 @@ -247,7 +247,7 @@ end subroutine surface_driver !! @author George Gayno NOAA/EMC subroutine interp(localpet) - use mpi + use mpi_f08 use esmf use sfc_input_data, only : canopy_mc_input_grid, & diff --git a/sorc/chgres_cube.fd/utils.F90 b/sorc/chgres_cube.fd/utils.F90 index c46540c5e..2f2eccc1b 100644 --- a/sorc/chgres_cube.fd/utils.F90 +++ b/sorc/chgres_cube.fd/utils.F90 @@ -11,7 +11,7 @@ module utilities !! @param[in] rc error status code subroutine error_handler(string, rc) - use mpi + use mpi_f08 implicit none @@ -33,7 +33,7 @@ end subroutine error_handler !! @param[in] string error message subroutine netcdf_err( err, string ) - use mpi + use mpi_f08 use netcdf implicit none diff --git a/sorc/cpld_gridgen.fd/CMakeLists.txt b/sorc/cpld_gridgen.fd/CMakeLists.txt index 0cdfc3540..c4e99ae63 100644 --- a/sorc/cpld_gridgen.fd/CMakeLists.txt +++ b/sorc/cpld_gridgen.fd/CMakeLists.txt @@ -25,11 +25,6 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -assume byterecl") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -fdefault-real-8") - - # Turn on this argument mismatch flag for gfortran10. - if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") - endif() endif() set(exe_name cpld_gridgen) diff --git a/sorc/gblevents.fd/CMakeLists.txt b/sorc/gblevents.fd/CMakeLists.txt index ee39d9358..22086de19 100644 --- a/sorc/gblevents.fd/CMakeLists.txt +++ b/sorc/gblevents.fd/CMakeLists.txt @@ -4,6 +4,9 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8") + if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") + endif() set(CMAKE_Fortran_FLAGS_RELEASE "-O3") endif() diff --git a/sorc/lsm_routines.fd/noah.fd/CMakeLists.txt b/sorc/lsm_routines.fd/noah.fd/CMakeLists.txt index b971b9712..daa252e56 100644 --- a/sorc/lsm_routines.fd/noah.fd/CMakeLists.txt +++ b/sorc/lsm_routines.fd/noah.fd/CMakeLists.txt @@ -12,9 +12,6 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -convert big_endian") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8 -fconvert=big-endian") - if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") - endif() endif() set(lib_name noah_lsm_routines) diff --git a/sorc/orog_mask_tools.fd/orog.fd/CMakeLists.txt b/sorc/orog_mask_tools.fd/orog.fd/CMakeLists.txt index 79fefcefb..04ab86742 100644 --- a/sorc/orog_mask_tools.fd/orog.fd/CMakeLists.txt +++ b/sorc/orog_mask_tools.fd/orog.fd/CMakeLists.txt @@ -6,7 +6,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8 -fconvert=big-endian -fno-range-check") if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz") + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-invalid-boz") endif() endif() if(ip_VERSION GREATER_EQUAL 4.0.0) diff --git a/sorc/orog_mask_tools.fd/orog_gsl.fd/CMakeLists.txt b/sorc/orog_mask_tools.fd/orog_gsl.fd/CMakeLists.txt index 6499db583..8704e4d54 100644 --- a/sorc/orog_mask_tools.fd/orog_gsl.fd/CMakeLists.txt +++ b/sorc/orog_mask_tools.fd/orog_gsl.fd/CMakeLists.txt @@ -9,7 +9,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8 -fno-range-check") if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz") + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-invalid-boz") endif() endif() diff --git a/sorc/weight_gen.fd/CMakeLists.txt b/sorc/weight_gen.fd/CMakeLists.txt index 8d8e05db7..6871c37cc 100644 --- a/sorc/weight_gen.fd/CMakeLists.txt +++ b/sorc/weight_gen.fd/CMakeLists.txt @@ -6,9 +6,6 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -i4 -convert big_endian") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8") - if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") - endif() endif() set(exe_name weight_gen)