From ca0415200d1abecffb06ac34731c372b11d08489 Mon Sep 17 00:00:00 2001 From: Weiyuan Jiang <52509753+weiyuan-jiang@users.noreply.github.com> Date: Fri, 17 Jan 2025 09:44:13 -0500 Subject: [PATCH] fixed kind=8 (#3340) Co-authored-by: Tom Clune Co-authored-by: Matt Thompson --- base/NCIO.F90 | 16 ++++++++-------- base/tests/utCFIO_Array.F90 | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/base/NCIO.F90 b/base/NCIO.F90 index f6657a582ff1..5ad1fc5bbd3c 100644 --- a/base/NCIO.F90 +++ b/base/NCIO.F90 @@ -5079,12 +5079,12 @@ function create_flipped_field(field,rc) result(flipped_field) end function create_flipped_field subroutine MAPL_ReadTilingNC4(File, GridName, im, jm, nx, ny, n_Grids, iTable, rTable, N_PfafCat, AVR,rc) - character(*), intent(IN) :: File - character(*), optional, intent(out) :: GridName(:) - integer, optional, intent(out) :: IM(:), JM(:) - integer, optional, intent(out) :: nx, ny, n_Grids - integer, optional, allocatable, intent(out) :: iTable(:,:) - real(kind=8), optional, allocatable, intent(out) :: rTable(:,:) + character(*), intent(IN) :: File + character(*), optional, intent(out) :: GridName(:) + integer, optional, intent(out) :: IM(:), JM(:) + integer, optional, intent(out) :: nx, ny, n_Grids + integer, optional, allocatable, intent(out) :: iTable(:,:) + real(kind=REAL64), optional, allocatable, intent(out) :: rTable(:,:) integer, optional, intent(out) :: N_PfafCat real, optional, pointer, intent(out) :: AVR(:,:) ! used by GEOSgcm integer, optional, intent(out) :: rc @@ -5098,11 +5098,11 @@ subroutine MAPL_ReadTilingNC4(File, GridName, im, jm, nx, ny, n_Grids, iTable, r class(*), pointer :: attr_val(:) class(*), pointer :: char_val integer, allocatable :: tmp_int(:) - real(kind=8), allocatable :: fr(:) + real(kind=REAL64),allocatable :: fr(:) integer :: NumCol integer, allocatable :: iTable_(:,:) - real(kind=8), allocatable :: rTable_(:,:) + real(kind=REAL64), allocatable :: rTable_(:,:) call formatter%open(File, pFIO_READ, rc=status) meta = formatter%read(rc=status) diff --git a/base/tests/utCFIO_Array.F90 b/base/tests/utCFIO_Array.F90 index 8f866b0b16ca..81537aba0533 100644 --- a/base/tests/utCFIO_Array.F90 +++ b/base/tests/utCFIO_Array.F90 @@ -6,6 +6,7 @@ Program utCFIO + use, intrinsic :: iso_fortran_env, only: REAL64 use ESMF use MAPL_BaseMod @@ -332,7 +333,7 @@ subroutine MAPL_GridGetLatLons ( grid, lons, lats ) type(ESMF_Array) :: eARRAY(2) - real(KIND=8), pointer :: R8D2(:,:) + real(KIND=REAL64), pointer :: R8D2(:,:) real, pointer :: lons2d(:,:), lats2d(:,:) real, pointer :: LONSLocal(:,:), LATSlocal(:,:) integer :: IM_WORLD, JM_WORLD, dims(3)