Skip to content

Commit

Permalink
Merge branch 'master' into ejh_err
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett authored Jun 26, 2019
2 parents b059b6d + ab6c5fe commit 4b766be
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/flib/pio_support.F90
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ subroutine replace_c_null(istr, ilen)
integer(kind=pio_offset_kind), optional, intent(in) :: ilen
integer :: i, slen
if(present(ilen)) then
slen = ilen
slen = int(ilen)
else
slen = len(istr)
endif
Expand Down
15 changes: 14 additions & 1 deletion src/flib/pionfput_mod.F90.in
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ contains
end function put_var_0d_{TYPE}


! TYPE int,real,double
integer function put_vara_internal_{TYPE} (ncid,varid,start,count, ival) result(ierr)
integer, intent(in) :: ncid
integer, intent(in) :: varid
Expand Down Expand Up @@ -451,7 +452,19 @@ contains
character(C_CHAR), intent(out) :: cstr(:)
integer :: clen, sd({DIMS})
integer :: cinc
integer :: i, j, k, m, n, q
integer :: i, j
#if {DIMS} >= 2
integer :: k
#endif
#if {DIMS} >= 3
integer :: m
#endif
#if {DIMS} >= 4
integer :: n
#endif
#if {DIMS} == 5
integer :: q
#endif

cstr = C_NULL_CHAR
do i=1,{DIMS}
Expand Down
6 changes: 3 additions & 3 deletions tests/general/ncdf_get_put.F90.in
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ PIO_TF_AUTO_TEST_SUB_BEGIN test_put_get_1dvar_slice
Implicit none
type(file_desc_t) :: pio_file
character(len=PIO_TF_MAX_STR_LEN) :: filename
type(var_desc_t) :: pio_var, pio_cvar
type(var_desc_t) :: pio_var
integer :: pio_dim
integer, parameter :: MAX_ROW_DIM_LEN = 100
PIO_TF_FC_DATA_TYPE, dimension(MAX_ROW_DIM_LEN) :: gval, exp_val
Expand Down Expand Up @@ -315,7 +315,7 @@ PIO_TF_AUTO_TEST_SUB_BEGIN test_put_get_1dvar_4parts
Implicit none
type(file_desc_t) :: pio_file
character(len=PIO_TF_MAX_STR_LEN) :: filename
type(var_desc_t) :: pio_var, pio_cvar
type(var_desc_t) :: pio_var
integer :: pio_dim
integer, parameter :: DIM_LEN = 16
integer, parameter :: PART_LEN = DIM_LEN / 4
Expand Down Expand Up @@ -420,7 +420,7 @@ PIO_TF_AUTO_TEST_SUB_BEGIN test_put_get_md2mdplus1_var
integer, dimension(:), allocatable :: iotypes
character(len=PIO_TF_MAX_STR_LEN), dimension(:), allocatable :: iotype_descs
integer :: num_iotypes
integer :: i, k, l, m, n, tstep, ret
integer :: i, k, l, m, tstep, ret

num_iotypes = 0
call PIO_TF_Get_nc_iotypes(iotypes, iotype_descs, num_iotypes)
Expand Down
1 change: 0 additions & 1 deletion tests/general/ncdf_inq.F90.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ SUBROUTINE test_inq_var(pio_file, ret)
type(file_desc_t), intent(in) :: pio_file
integer, intent(inout) :: ret

type(var_desc_t) :: pio_var
integer :: var_id, var_type, var_ndims, var_natts
integer, dimension(:), allocatable :: var_dims
character(len=pio_max_name) :: var_name
Expand Down
2 changes: 0 additions & 2 deletions tests/general/pio_rearr.F90.in
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ PIO_TF_AUTO_TEST_SUB_BEGIN test_rearrs_combs
character(len=PIO_TF_MAX_STR_LEN), parameter :: attname = "filename"
character(len=PIO_TF_MAX_STR_LEN), parameter :: dimname = "filename_dim"
integer, parameter :: NUM_REARRANGERS = 2
integer :: rearrs(NUM_REARRANGERS) = (/pio_rearr_subset,pio_rearr_box/)
integer, parameter :: MAX_PERMS = 4
integer :: rearrs_perms(NUM_REARRANGERS,MAX_PERMS) = reshape(&
(/pio_rearr_subset, pio_rearr_box,&
Expand All @@ -206,7 +205,6 @@ PIO_TF_AUTO_TEST_SUB_BEGIN test_rearrs_combs
"PIO_REARR_BOX ", "PIO_REARR_BOX "/),&
(/NUM_REARRANGERS,MAX_PERMS/)&
)
character(len=PIO_TF_MAX_STR_LEN) :: rearrs_info(NUM_REARRANGERS) = (/"PIO_REARR_SUBSET","PIO_REARR_BOX "/)
integer, dimension(:), allocatable :: iotypes
character(len=PIO_TF_MAX_STR_LEN), dimension(:), allocatable :: iotype_descs
integer :: i, j, k, num_iotypes = 0
Expand Down
3 changes: 0 additions & 3 deletions tests/general/util/pio_tutil.F90
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,6 @@ LOGICAL FUNCTION PIO_TF_Check_int_arr_arr_(arr, exp_arr, arr_shape)
INTEGER :: nequal_idx
! Local and global equal bools
LOGICAL :: lequal, gequal
LOGICAL :: failed
TYPE failed_info
SEQUENCE
INTEGER :: idx
Expand Down Expand Up @@ -724,7 +723,6 @@ LOGICAL FUNCTION PIO_TF_Check_real_arr_arr_tol_(arr, exp_arr, arr_shape, tol)
REAL(KIND=fc_real) :: nequal_idx
! Local and global equal bools
LOGICAL :: lequal, gequal
LOGICAL :: failed
TYPE failed_info
SEQUENCE
REAL(KIND=fc_real) :: idx
Expand Down Expand Up @@ -857,7 +855,6 @@ LOGICAL FUNCTION PIO_TF_Check_double_arr_arr_tol_(arr, exp_arr, arr_shape, tol)
REAL(KIND=fc_double) :: nequal_idx
! Local and global equal bools
LOGICAL :: lequal, gequal
LOGICAL :: failed
TYPE failed_info
SEQUENCE
REAL(KIND=fc_double) :: idx
Expand Down

0 comments on commit 4b766be

Please sign in to comment.