@@ -26,7 +26,7 @@ subroutine test_12(error_cnt)
26
26
27
27
integer ,intent (out ) :: error_cnt ! ! report number of errors to caller
28
28
29
- integer ,parameter :: imx = 5 , jmx = 3 , kmx = 4 ! ! dimensions for raw work array of primitive type
29
+ integer (IK) ,parameter :: imx = 5 , jmx = 3 , kmx = 4 ! ! dimensions for raw work array of primitive type
30
30
31
31
type (json_core) :: json ! ! factory for manipulating `json_value` pointers
32
32
integer (IK),dimension (3 ) :: shape ! ! shape of work array
@@ -38,7 +38,7 @@ subroutine test_12(error_cnt)
38
38
real (wp) :: array_element
39
39
real (wp), dimension (:), allocatable :: fetched_array
40
40
character (kind= CK,len= :), allocatable :: description
41
- integer :: i,j,k ! ! loop indices
41
+ integer (IK) :: i,j,k ! ! loop indices
42
42
integer (IK) :: array_length, lun
43
43
logical (LK) :: existed
44
44
logical (LK), dimension (:), allocatable :: SOS
@@ -54,8 +54,8 @@ subroutine test_12(error_cnt)
54
54
write (error_unit,' (A)' ) ' '
55
55
56
56
! populate the raw array
57
- forall (i= 1 :imx,j= 1 :jmx,k= 1 :kmx) ! could use size(... , dim=...) instead of constants
58
- raw_array(i,j,k) = i + (j-1 )* imx + (k-1 )* imx* jmx
57
+ forall (i= 1_IK :imx,j= 1_IK :jmx,k= 1_IK :kmx) ! could use size(... , dim=...) instead of constants
58
+ raw_array(i,j,k) = i + (j-1_IK )* imx + (k-1_IK )* imx* jmx
59
59
end forall
60
60
61
61
call json% create_object(root,dir// file)
@@ -218,13 +218,13 @@ subroutine get_3D_from_array(json, element, i, count)
218
218
integer (IK),intent (in ) :: i ! ! index
219
219
integer (IK),intent (in ) :: count ! ! size of array
220
220
221
- integer :: useless ! ! assign count to this to silence warnings
221
+ integer (IK) :: useless ! ! assign count to this to silence warnings
222
222
223
223
! let's pretend we're c programmers!
224
224
call json% get( element, raw_array( &
225
- mod (i-1 ,imx) + 1 , & ! i index
226
- mod ((i-1 )/ imx,jmx) + 1 , & ! j index
227
- mod ((i-1 )/ imx/ jmx,kmx) + 1 ) ) ! k inded
225
+ mod (i-1_IK ,imx) + 1_IK , & ! i index
226
+ mod ((i-1_IK )/ imx,jmx) + 1_IK , & ! j index
227
+ mod ((i-1_IK )/ imx/ jmx,kmx) + 1_IK ) ) ! k inded
228
228
229
229
useless = count
230
230
0 commit comments