Commit 9abea3e0 authored by Robert Schweppe's avatar Robert Schweppe
Browse files

- added compile definition "LARGE_ARRAYS" to control the integer kind...

- added compile definition "LARGE_ARRAYS" to control the integer kind definiton of large array sizes (default/off: i4, on: i8)
parent ec00d9ad
Pipeline #24459 failed with stages
in 5 minutes and 6 seconds
......@@ -5,6 +5,12 @@ file (GLOB sources ./mo_mpr_*.f90)
#file (GLOB sources ./*.f90)
add_library (${LIB_NAME} ${sources})
# an option to set the i8 kind for handling bigger arrays, default is i4
option(LARGE_ARRAYS "support handling of arrays with sizes > 2 147 483 647 (2^32-1)")
if (${LARGE_ARRAYS})
target_compile_definitions(${LIB_NAME} PRIVATE LARGE_ARRAYS)
endif()
set (FORCES_NAME lightweight_fortran_lib)
find_package(${FORCES_NAME})
......
......@@ -16,6 +16,13 @@ MODULE mo_mpr_constants
PRIVATE
#ifdef LARGE_ARRAYS
integer, parameter, public :: ix = i4
#else
integer, parameter, public :: ix = i8
#endif
! ------------------------------------------------------------------
! maximum values
! ------------------------------------------------------------------
......@@ -42,7 +49,7 @@ MODULE mo_mpr_constants
character(maxNameLength), parameter, public :: defaultAlias = "not_initialized"
character(6), parameter, public :: defaultCoordStagger = "center"
character(7), parameter, public :: defaultCoordUnits = "degrees"
integer(i8), parameter, public :: defaultCoordCount = 0_i8
integer(ix), parameter, public :: defaultCoordCount = 0_ix
logical, parameter, public :: defaultCoordIsAscending = .true.
real(dp), parameter, public, dimension(2) :: defaultDataArrayLimits = nodata_dp
logical, parameter, public :: defaultDataArrayToFile = .true.
......
......@@ -10,11 +10,11 @@
#include "flogging.h"
module mo_mpr_coordinate
use mo_kind, only : dp, i4, i8
use mo_kind, only : dp, i4
use mo_string_utils, only : num2str, compress
use mo_constants, only : nodata_dp, nodata_i4, nodata_i8
use mo_constants, only : nodata_dp, nodata_i4
use mo_mpr_constants, only : defaultAlias, MaxNoCoords, maxTolerance, maxNameLength, maxStringLength, &
defaultCoordUnits, defaultCoordIsAscending, defaultCoordCount
defaultCoordUnits, defaultCoordIsAscending, defaultCoordCount, ix
use mo_utils, only : eq, ne
use mo_netcdf, only : NcDataset, NcDimension, NcVariable
use ieee_arithmetic, only : ieee_is_nan
......@@ -36,7 +36,7 @@ module mo_mpr_coordinate
type, extends(MprBaseType), public :: Coordinate
real(dp) :: step
integer(i8) :: count
integer(ix) :: count
integer(i4) :: rank
integer(i4) :: corners
real(dp), dimension(:), allocatable :: values
......@@ -53,7 +53,7 @@ module mo_mpr_coordinate
character(maxStringLength):: projString
character(maxStringLength):: unit
character(maxNameLength), dimension(:), allocatable :: subDims
integer(i8), dimension(:), allocatable :: subDimSizes
integer(ix), dimension(:), allocatable :: subDimSizes
contains
private
......@@ -210,7 +210,7 @@ contains
real(dp), intent(in), optional :: bound
real(dp), intent(in), optional :: start
real(dp), intent(in), optional :: step
integer(i8), intent(in), optional :: count_
integer(ix), intent(in), optional :: count_
character(*), dimension(:), intent(in), optional :: attributeNames
character(*), dimension(:), intent(in), optional :: attributeValues
character(*), intent(in), optional :: projString
......@@ -228,7 +228,7 @@ contains
real(dp) :: startArg
real(dp) :: stepArg
integer(i4) :: iPolygon
integer(i8) :: countArg
integer(ix) :: countArg
logical, dimension(:,:), allocatable :: mask
! check values and set
......@@ -244,11 +244,11 @@ contains
newCoordinate%staggerName = trim(stagger)
select case(trim(stagger))
case("start")
newCoordinate%staggerId = 0_i8
newCoordinate%staggerId = 0_ix
case("center")
newCoordinate%staggerId = 1_i8
newCoordinate%staggerId = 1_ix
case("end")
newCoordinate%staggerId = 2_i8
newCoordinate%staggerId = 2_ix
case default
log_error(*) "Error during initialization of Coordinate '", trim(name), "'. The stagger string '", &
trim(stagger),"' is not known. Use 'start', 'center' or 'end'."
......@@ -357,14 +357,14 @@ contains
end if
end if
end if
if (.not. allocated(newCoordinate%subDimSizes)) allocate(newCoordinate%subDimSizes(0_i8))
if (.not. allocated(newCoordinate%subDimSizes)) allocate(newCoordinate%subDimSizes(0_ix))
if (.not. allocated(newCoordinate%subDims)) allocate(newCoordinate%subDims(0_i4))
! store the polygon information
if (present(centersCoord1) .and. present(centersCoord2)) then
newCoordinate%centersCoord1 = centersCoord1
newCoordinate%centersCoord2 = centersCoord2
call newCoordinate%set_count(size(centersCoord2, kind=i8))
call newCoordinate%set_count(size(centersCoord2, kind=ix))
newCoordinate%rank = 2_i4
if (present(cornersCoord1) .and. present(cornersCoord2)) then
newCoordinate%cornersCoord1 = cornersCoord1
......@@ -478,7 +478,7 @@ contains
end if
else if (.not. coord1%is_2d() .and. .not. coord2%is_2d()) then
! ...comparing two 1d coordinates, data values should also be equal
if (size(coord1%values, kind=i8) /= size(coord2%values, kind=i8)) then
if (size(coord1%values, kind=ix) /= size(coord2%values, kind=ix)) then
! different size of values
log_subtrace(*) 'equalCoordinate: different vector size'
return
......@@ -559,7 +559,7 @@ contains
integer(i4) :: j, vectorSize, coordIndex, dimSize
integer(i4), allocatable, dimension(:) :: dimSizes
integer(i8) :: i
integer(ix) :: i
character(maxNameLength) :: errorString, boundVariable
! init
......@@ -587,7 +587,7 @@ contains
call ncVar%getAttribute('bounds', boundVariable)
ncVar = nc%getVariable(trim(boundVariable))
call ncVar%getData(dummy)
if (self%staggerId >= 1_i8) then
if (self%staggerId >= 1_ix) then
! end- or center-bound values
bound = dummy(1, 1)
! overwrite data by bound information
......@@ -683,7 +683,7 @@ contains
! found the title, now read all the different field information
! start with the coordinates
call read_coordinate_from_file(nc, 'grid_size', dimSize)
call self%set_count(int(dimSize, kind=i8))
call self%set_count(int(dimSize, kind=ix))
! assuming a rank of 2
! SCRIP uses rank 1 for unstructured grids, we use it differently
! call read_coordinate_from_file(nc, 'grid_rank', self%rank)
......@@ -715,7 +715,7 @@ contains
! for now ignore the mask as this applied later on with the data array only
! call self%read_mask_from_file(nc, 'grid_imask', self%mask)
call read_variable_from_file(nc, 'grid_dims', dimSizes)
self%subDimSizes = int(dimSizes, kind=i8)
self%subDimSizes = int(dimSizes, kind=ix)
ncVar = nc%getVariable('grid_center_lon')
! this is mimicking the retrieval of grids.f in SCRIP -> assume unit to be similar over all variables
......@@ -810,9 +810,9 @@ contains
!> start value
real(dp), intent(in):: start
!> number of values in range
integer(i8), intent(in):: count
integer(ix), intent(in):: count
integer(i8) :: i
integer(ix) :: i
self%step = step
log_debug(*) "Initializing coordinate '", trim(self%name), "' from complete range."
......@@ -830,8 +830,8 @@ contains
! set values and count properties
call self%set_count(count)
allocate(self%values(0_i8 : self%count))
self%values(:) = self%bounds(1) + (/(i * self%step, i = 0_i8, self%count)/)
allocate(self%values(0_ix : self%count))
self%values(:) = self%bounds(1) + (/(i * self%step, i = 0_ix, self%count)/)
end subroutine from_range
......@@ -869,10 +869,10 @@ contains
call other%get_stats()
stop 1
end if
call self%set_count(floor(abs(other%count * other%step / self%step), kind=i8))
call self%set_count(floor(abs(other%count * other%step / self%step), kind=ix))
end if
allocate(self%values(0_i8: self%count))
self%values = other%bounds(1) + (/(i * self%step, i = 0_i8, self%count)/)
allocate(self%values(0_ix: self%count))
self%values = other%bounds(1) + (/(i * self%step, i = 0_ix, self%count)/)
self%bounds(:) = [self%values(0), self%values(self%count)]
else
log_error(*) "The coordinate '", trim(self%name), "' cannot be initialized, please set", &
......@@ -899,15 +899,15 @@ contains
select case(self%staggerId)
case(0)
tempValues = self%values(0_i8 : self%count - 1_i8)
tempValues = self%values(0_ix : self%count - 1_ix)
deallocate(self%values)
call self%set_values(tempValues, newBound)
case(1)
! reverse the operations done at set_values
! this case should normally not be called, as the set_values routine issues an error
! if it is called without a bound and this routine should be called only when there was no bound available
tempValues(2_i8:self%count) = self%values(1_i8:self%count-1_i8) - &
(self%values(2_i8:self%count) - self%values(1_i8:self%count-1_i8)) / 2.0_dp
tempValues(2_ix:self%count) = self%values(1_ix:self%count-1_ix) - &
(self%values(2_ix:self%count) - self%values(1_ix:self%count-1_ix)) / 2.0_dp
tempValues(1) = self%values(1) - (self%values(2) - self%values(1)) / 2.0_dp
deallocate(self%values)
call self%set_values(tempValues, newBound)
......@@ -916,7 +916,7 @@ contains
trim(self%name), "' should not be re-inserted as it is center-staggered."
! stop 1
case(2)
tempValues = self%values(1_i8:self%count)
tempValues = self%values(1_ix:self%count)
deallocate(self%values)
call self%set_values(tempValues, newBound)
end select
......@@ -989,23 +989,23 @@ contains
!> if a step size is defined (regular increment), then bound is not needed
real(dp), intent(in), optional :: bound
integer(i8) :: i
integer(ix) :: i
! initialize from values
call self%set_count(size(values, kind=i8))
allocate(self%values(0_i8 : self%count))
call self%set_count(size(values, kind=ix))
allocate(self%values(0_ix : self%count))
! set the values depending on self%staggerId
select case(self%staggerId)
case(0)
self%values(0_i8 : self%count - 1_i8) = values(:)
self%values(0_ix : self%count - 1_ix) = values(:)
! start-bound values with bound determining the end boundary of the values
if (present(bound)) then
call self%check_bound(bound, values)
self%values(self%count) = bound
else if (ne(self%step, nodata_dp)) then
! use the step size
self%values(self%count) = self%values(self%count - 1_i8) + self%step
self%values(self%count) = self%values(self%count - 1_ix) + self%step
end if
case(1)
! center-bound values with bound determining the start boundary of the values
......@@ -1013,21 +1013,21 @@ contains
call self%check_bound(bound, values)
self%values(0) = bound
! center-bound values with different cell widths, need step-wise setting of cell sizes
do i = 1_i8, self%count - 1_i8
do i = 1_ix, self%count - 1_ix
! use the middle between the current and the following cell as the endpoint
self%values(i) = values(i) + (values(i + 1_i8) - values(i)) / 2.0_dp
self%values(i) = values(i) + (values(i + 1_ix) - values(i)) / 2.0_dp
end do
if (self%count == 1_i8) then
if (self%count == 1_ix) then
! infer the end of the last cell from previous cell's width, values(i-1) does not exist in this case
self%values(self%count) = values(i) + (values(i) - self%values(0)) / 2.0_dp
else
! infer the end of the last cell from previous cell's width
self%values(self%count) = values(i) + (values(i) - values(i - 1_i8)) / 2.0_dp
self%values(self%count) = values(i) + (values(i) - values(i - 1_ix)) / 2.0_dp
end if
else if (ne(self%step, nodata_dp)) then
! use the step size
self%values(0_i8 : self%count - 1_i8) = values(:) - (self%step / 2.0_dp)
self%values(self%count) = self%values(self%count - 1_i8) + self%step
self%values(0_ix : self%count - 1_ix) = values(:) - (self%step / 2.0_dp)
self%values(self%count) = self%values(self%count - 1_ix) + self%step
else
log_error(*) 'Trying to set coordinate values with center-staggerd values and without a bound.', &
'Unexpected configuration, contact developer!'
......@@ -1043,7 +1043,7 @@ contains
else if (ne(self%step, nodata_dp)) then
! use the step size
self%values(0) = self%values(1) - self%step
else if (self%count > 1_i8) then
else if (self%count > 1_ix) then
self%values(0) = self%values(1) - (self%values(2) - self%values(1))
else
log_error(*) 'Unexpected configuration, contact developer!'
......@@ -1072,22 +1072,22 @@ contains
!> if a step size is defined (regular increment), then bound is not needed
real(dp), intent(in) :: bound
integer(i8) :: isAscending
integer(ix) :: isAscending
character(512) :: errorString
! check for ascending values
isAscending = 0_i8
if (values(1) > values(size(values, kind=i8))) then
isAscending = 1_i8
isAscending = 0_ix
if (values(1) > values(size(values, kind=ix))) then
isAscending = 1_ix
end if
! prepare first part of possible error message
errorString = "The provided values bound ("//compress(num2str(bound))//") for coordinate '"//trim(self%name)//"'"
select case(self%staggerId + (3_i8 * isAscending))
select case(self%staggerId + (3_ix * isAscending))
case(0)
! ascending and start-bound
if (bound <= values(self%count)) then
if (size(values, kind=i8) > 1_i8) then
if (size(values, kind=ix) > 1_ix) then
log_error("(1X,A,A,A,F0.6,A)") trim(errorString), " must be greater than the last value (", &
values(self%count), ") if the values are ", trim(self%staggerName), "-staggered and in ascending order."
stop 1
......@@ -1096,7 +1096,7 @@ contains
case(1,2)
! ascending and center- or end-bound
if (bound >= values(1)) then
if (size(values, kind=i8) > 1_i8) then
if (size(values, kind=ix) > 1_ix) then
log_error("(1X,A,A,A,F0.6,A)") trim(errorString), " must be smaller than the first value (", &
values(1), ") if the values are ", trim(self%staggerName), "-staggered and in ascending order."
stop 1
......@@ -1105,7 +1105,7 @@ contains
case(3)
! descending and start-bound
if (bound >= values(self%count)) then
if (size(values, kind=i8) > 1_i8) then
if (size(values, kind=ix) > 1_ix) then
log_error("(1X,A,A,A,F0.6,A)") trim(errorString), " must be smaller than the last value (", &
values(self%count), ") if the values are ", trim(self%staggerName), "-staggered and in descending order."
stop 1
......@@ -1114,7 +1114,7 @@ contains
case(4,5)
! descending and center- or end-bound
if (bound <= values(1)) then
if (size(values, kind=i8) > 1_i8) then
if (size(values, kind=ix) > 1_ix) then
log_error("(1X,A,A,A,F0.6,A)") trim(errorString), " must be greater than the first value (", &
values(1), ") if the values are ", trim(self%staggerName), "-staggered and in descending order."
stop 1
......@@ -1136,21 +1136,21 @@ contains
!> provide the step size directly
real(dp), intent(in), optional :: step
integer(i8) :: i, count
integer(ix) :: i, count
if (present(step)) then
self%step = step
log_debug(*) 'set_step: set step for coordinate "', trim(self%name), '" based on step size passed: ', step
else if (present(values)) then
count = size(values, kind=i8)
count = size(values, kind=ix)
if (count >= 2_i8) then
if (count >= 2_ix) then
! check if all values have similar length
self%step = values(2) - values(1)
do i = 2_i8, count
do i = 2_ix, count
! if (ne((values(i) - values(i - 1)), self%step)) then
! TODO: how to handle this, what is numerical precision in netcdf dimensions?
if (abs((values(i) - values(i - 1_i8)) - self%step) >= maxTolerance) then
if (abs((values(i) - values(i - 1_ix)) - self%step) >= maxTolerance) then
self%step = nodata_dp
log_debug(*) 'set_step: set step for coordinate "', trim(self%name), '" to ', nodata_dp, &
'as there are differing step sizes (', values(i), ', ', values(i - 1), ') at index ', i
......@@ -1195,7 +1195,7 @@ contains
!> Coordinate type-bound procedure
class(Coordinate), intent(inout) :: self
!> number of cells
integer(i8), intent(in) :: count
integer(ix), intent(in) :: count
self%count = abs(count)
end subroutine set_count
......@@ -1209,7 +1209,7 @@ contains
if (self%is_polygon()) then
! assume that last index of polygons is the number of polygons
call self%set_count(size(self%cornersCoord1, dim=2, kind=i8))
call self%set_count(size(self%cornersCoord1, dim=2, kind=ix))
else if (self%is_2d()) then
if (allocated(self%subDimSizes)) then
deallocate(self%subDimSizes)
......@@ -1231,9 +1231,9 @@ contains
class(Coordinate), intent(inout) :: self
integer(i4) :: iCoord, iCorner
integer(i8) :: iCell, iCell1, iCell2
integer(i8), dimension(4), parameter :: coord1Addon = [0_i4, 1_i4, 1_i4, 0_i4]
integer(i8), dimension(4), parameter :: coord2Addon = [0_i4, 0_i4, 1_i4, 1_i4]
integer(ix) :: iCell, iCell1, iCell2
integer(ix), dimension(4), parameter :: coord1Addon = [0_i4, 1_i4, 1_i4, 0_i4]
integer(ix), dimension(4), parameter :: coord2Addon = [0_i4, 0_i4, 1_i4, 1_i4]
type(CoordinatePointer), dimension(:), allocatable :: sourceCoords
! set the pointers to the two source coordinates
......@@ -1261,18 +1261,18 @@ contains
allocate(self%centersCoord2(self%count))
! loop over each cell and set the midpoints and the corners
do iCell=1_i8, self%count
do iCell=1_ix, self%count
! get the index of both source coordinates for the current target cell
iCell1 = mod(iCell -1_i8, self%subDimSizes(1)) + 1_i8
iCell2 = ((iCell -1_i8) / self%subDimSizes(1)) + 1_i8
iCell1 = mod(iCell -1_ix, self%subDimSizes(1)) + 1_ix
iCell2 = ((iCell -1_ix) / self%subDimSizes(1)) + 1_ix
! loop over all 4 corners and set the corners of the cell in a counterclockwise fashion (see dimxAddon)
do iCorner=1, self%corners
self%cornersCoord1(iCorner, iCell) = sourceCoords(1)%coord_p%values(iCell1-1_i8 + coord1Addon(iCorner))
self%cornersCoord2(iCorner, iCell) = sourceCoords(2)%coord_p%values(iCell2-1_i8 + coord2Addon(iCorner))
self%cornersCoord1(iCorner, iCell) = sourceCoords(1)%coord_p%values(iCell1-1_ix + coord1Addon(iCorner))
self%cornersCoord2(iCorner, iCell) = sourceCoords(2)%coord_p%values(iCell2-1_ix + coord2Addon(iCorner))
end do
! now set the center points, simply use mean of bounds for that
self%centersCoord1(iCell) = (sourceCoords(1)%coord_p%values(iCell1-1_i8) + sourceCoords(1)%coord_p%values(iCell1)) / 2.0_dp
self%centersCoord2(iCell) = (sourceCoords(2)%coord_p%values(iCell2-1_i8) + sourceCoords(2)%coord_p%values(iCell2)) / 2.0_dp
self%centersCoord1(iCell) = (sourceCoords(1)%coord_p%values(iCell1-1_ix) + sourceCoords(1)%coord_p%values(iCell1)) / 2.0_dp
self%centersCoord2(iCell) = (sourceCoords(2)%coord_p%values(iCell2-1_ix) + sourceCoords(2)%coord_p%values(iCell2)) / 2.0_dp
end do
......@@ -1386,15 +1386,15 @@ contains
if (allocated(self%values)) then
! make some pretty output here
if (self%count > 3_i8) then
if (self%count > 3_ix) then
! print values with index 1,2,...,last
log_info("(1X,A,A,F0.6,A,F0.6,A,F0.6,A)") 'The (cell end) values are: [', self%values(1), &
', ', self%values(2), ', ..., ', self%values(self%count), ']'
else if (self%count == 3_i8) then
else if (self%count == 3_ix) then
! print values with index 1,2,last
log_info("(1X,A,A,F0.6,A,F0.6,A,F0.6,A)") 'The (cell end) values are: [', self%values(1), &
', ', self%values(2), ', ', self%values(self%count), ']'
else if (self%count == 2_i8) then
else if (self%count == 2_ix) then
! print values with index 1,2
log_info("(1X,A,A,F0.6,A,F0.6,A)") 'The (cell end) values are: [', self%values(1), ', ', self%values(2), ']'
else
......
......@@ -9,10 +9,10 @@
#include "flogging.h"
module mo_mpr_data_array
use mo_kind, only : dp, i4, i8
use mo_kind, only : dp, i4
use mo_mpr_constants, only : defaultAlias, defaultCoordStagger, defaultDataArrayLimits, &
defaultDataArrayToFile, maxStringLength, maxNoParameterPerDA, maxNoTemporalData, &
upperBoundName, lowerBoundName, maxNameLength
upperBoundName, lowerBoundName, maxNameLength, ix
use mo_mpr_utils, only : get_index_in_vector, get_n_initialized, &
get_mask_and_packed_data1D, get_mask_and_packed_data2D, &
......@@ -320,7 +320,7 @@ contains
function get_data_shape(self) result(dataShape)
class(DataArray), intent(in) :: self
integer(i8), dimension(:), allocatable :: dataShape
integer(ix), dimension(:), allocatable :: dataShape
integer(i4) :: iCoord
......@@ -339,7 +339,7 @@ contains
type(NcDimension), dimension(:), allocatable :: NcDims
type(NcVariable) :: ncVar
character(maxNameLength), dimension(:), allocatable :: coordNames
integer(i8), dimension(:), allocatable :: upscaledShape
integer(ix), dimension(:), allocatable :: upscaledShape
logical, dimension(:), allocatable :: tempMask1d
logical, dimension(:, :), allocatable :: tempMask2d
logical, dimension(:, :, :), allocatable :: tempMask3d
......@@ -825,7 +825,7 @@ contains
real(dp), dimension(:, :, :, :), allocatable :: data_4d
real(dp), dimension(:, :, :, :, :), allocatable :: data_5d
integer(i8), dimension(size(coords)) :: newShape
integer(ix), dimension(size(coords)) :: newShape
integer(i4) :: iCoord
! check if there is a need to alter the mask
......@@ -911,7 +911,7 @@ contains
character(maxNameLength) :: errorMessageStem
integer(i4) :: lowIndex, upIndex
integer(i8) :: nTrailingCoord, nLeadingCoord
integer(ix) :: nTrailingCoord, nLeadingCoord
integer(i4), dimension(:), allocatable :: coordIndex
character(maxNameLength) :: dimName
real(dp), dimension(:), allocatable :: values
......@@ -1109,12 +1109,12 @@ contains
if (upIndex > 0) then
values = coords(coordIndex(1))%coord_p%values(1 : coords(coordIndex(1))%coord_p%count)
else if (lowIndex > 0) then
values = coords(coordIndex(1))%coord_p%values(0 : coords(coordIndex(1))%coord_p%count - 1_i8)
values = coords(coordIndex(1))%coord_p%values(0 : coords(coordIndex(1))%coord_p%count - 1_ix)
end if
! count the copies we have to pass on to the spread(values) command later on
! this depends on whether the dimension is before coordIndex or after
nTrailingCoord = 1_i8; nLeadingCoord = 1_i8
nTrailingCoord = 1_ix; nLeadingCoord = 1_ix
do i = 1, size(coords)
if (i < coordIndex(1)) then
nLeadingCoord = nLeadingCoord * coords(i)%coord_p%count
......@@ -1394,7 +1394,7 @@ contains
call nc%close()
log_debug(*) 'read_nc: read DataArray "', trim(self%name), '" with shape ', varShape, ' and packed size ', &
size(data, kind=i8)
size(data, kind=ix)
do iCoord = 1, size(varShape)
! set the stagger value
......
This diff is collapsed.
#include "flogging.h"
module mo_mpr_input_field_container
use mo_kind, only : dp, i4, i8
use mo_kind, only : dp, i4
use mo_mpr_coordinate, only: CoordinatePointer, Coordinate, MPR_COORDINATES, add_coordinate, get_common_unit
use mo_constants, only: nodata_dp
use mo_mpr_constants, only: maxNameLength, maxStringLength
use mo_mpr_constants, only: maxNameLength, maxStringLength, ix
use mo_mpr_utils, only: get_index_in_vector, get_n_initialized
use mo_append, only: append
use mo_mpr_util_types, only: mpr_add_coord_alias
......@@ -59,7 +59,7 @@ contains
logical, dimension(:), allocatable, intent(out) :: reshapedMask
type(CoordinatePointer), dimension(:), allocatable, intent(out) :: coords
integer(i8), allocatable :: dataShape(:, :)
integer(ix), allocatable :: dataShape(:, :)
real(dp), allocatable :: coordValues(:)
character(maxNameLength) :: newCoordinateName
character(maxStringLength) :: unit
......@@ -127,7 +127,7 @@ contains
subroutine append_input_field_data(self, dataShape1, dataShape2, other, coordIndex, data, reshapedMask)
class(InputFieldContainer), intent(in) :: self
integer(i8) :: dataShape1(:), dataShape2(:)
integer(ix) :: dataShape1(:), dataShape2(:)
type(InputFieldContainer), intent(in) :: other
integer(i4), intent(in) :: coordIndex
real(dp), dimension(:), allocatable, intent(out) :: data
......@@ -171,7 +171,7 @@ contains
subroutine append_input_field_data_2d(self, dataShape1, dataShape2, other, coordIndex, data, reshapedMask)
class(InputFieldContainer), intent(in) :: self
integer(i8) :: dataShape1(:), dataShape2(:)
integer(ix) :: dataShape1(:), dataShape2(:)
type(InputFieldContainer), intent(in) :: other
integer(i4), intent(in) :: coordIndex
real(dp), dimension(:), allocatable, intent(out) :: data
......@@ -199,7 +199,7 @@ contains
subroutine append_input_field_data_3d(self, dataShape1, dataShape2, other, coordIndex, data, reshapedMask)
class(InputFieldContainer), intent(in) :: self
integer(i8) :: dataShape1(:), dataShape2(:)
integer(ix) :: dataShape1(:), dataShape2(:)