Changeset 4499 for palm/trunk/UTIL/inifor/src
- Timestamp:
- Apr 16, 2020 3:51:56 PM (5 years ago)
- Location:
- palm/trunk/UTIL/inifor/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/inifor/src/inifor_defs.f90
r4481 r4499 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Updated copyright notice, bumped version number 29 ! 30 ! 31 ! 4481 2020-03-31 18:55:54Z maronga 28 32 ! Bumped version number 29 33 ! … … 181 185 INTEGER, PARAMETER :: FORCING_STEP = 1 !< Number of hours between forcing time steps [h] 182 186 REAL(wp), PARAMETER :: NUDGING_TAU = 21600.0_wp !< Nudging relaxation time scale [s] 183 CHARACTER(LEN=*), PARAMETER :: COPYRIGHT = 'Copyright 2017-20 19Leibniz Universitaet Hannover' // &184 ACHAR( 10 ) // ' Copyright 2017-20 19Deutscher Wetterdienst Offenbach' !< Copyright notice187 CHARACTER(LEN=*), PARAMETER :: COPYRIGHT = 'Copyright 2017-2020 Leibniz Universitaet Hannover' // & 188 ACHAR( 10 ) // ' Copyright 2017-2020 Deutscher Wetterdienst Offenbach' !< Copyright notice 185 189 CHARACTER(LEN=*), PARAMETER :: LOG_FILE_NAME = 'inifor.log' !< Name of INIFOR's log file 186 CHARACTER(LEN=*), PARAMETER :: VERSION = '1.4.1 1' !< INIFOR version number190 CHARACTER(LEN=*), PARAMETER :: VERSION = '1.4.12' !< INIFOR version number 187 191 188 192 END MODULE inifor_defs -
palm/trunk/UTIL/inifor/src/inifor_util.f90
r4481 r4499 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Bugfix: avoid using already overwritten elements in 'reverse' subroutine 29 ! 30 ! 31 ! 4481 2020-03-31 18:55:54Z maronga 28 32 ! Bugfix: use explicit loop in 'reverse' subroutine instead of implicit loop 29 33 ! … … 272 276 SUBROUTINE reverse(input_arr) 273 277 274 INTEGER :: i 278 INTEGER :: idx, opposite_idx, half_idx 279 INTEGER :: size_1st_dimension 280 INTEGER :: size_2nd_dimension 281 INTEGER :: size_3rd_dimension 275 282 INTEGER :: lbound_3rd_dimension 276 283 INTEGER :: ubound_3rd_dimension 277 284 278 285 REAL(wp), INTENT(INOUT) :: input_arr(:,:,:) 286 REAL(wp), ALLOCATABLE :: buffer_arr(:,:) 279 287 280 288 lbound_3rd_dimension = LBOUND(input_arr, 3) 281 289 ubound_3rd_dimension = UBOUND(input_arr, 3) 282 283 DO i = lbound_3rd_dimension, ubound_3rd_dimension 284 input_arr(:,:,i) = input_arr(:,:, & 285 ubound_3rd_dimension - ( i - lbound_3rd_dimension )) 290 size_1st_dimension = SIZE(input_arr, 1) 291 size_2nd_dimension = SIZE(input_arr, 2) 292 size_3rd_dimension = SIZE(input_arr, 3) 293 half_idx = lbound_3rd_dimension + size_3rd_dimension / 2 - 1 294 295 ALLOCATE( buffer_arr(size_1st_dimension, size_2nd_dimension) ) 296 297 DO idx = lbound_3rd_dimension, half_idx 298 opposite_idx = ubound_3rd_dimension - ( idx - lbound_3rd_dimension ) 299 buffer_arr(:,:) = input_arr(:,:,idx) 300 input_arr(:,:,idx) = input_arr(:,:,opposite_idx) 301 input_arr(:,:,opposite_idx) = buffer_arr(:,:) 286 302 ENDDO 303 304 DEALLOCATE( buffer_arr ) 287 305 288 306 END SUBROUTINE reverse
Note: See TracChangeset
for help on using the changeset viewer.