Ignore:
Timestamp:
Mar 26, 2020 4:28:19 PM (5 years ago)
Author:
gronemeier
Message:

bugfixes/changes to INIFOR:

  • c: revise output format in routine report (inifor_control)
  • b: check if namelist file was opened (inifor_grid)
  • b: use explicit loop in routine reverse (inifor_util)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/UTIL/inifor/src/inifor_util.f90

    r3866 r4475  
    2626! -----------------
    2727! $Id$
     28! Bugfix: use explicit loop in 'reverse' subroutine instead of implicit loop
     29!
     30! 3866 2019-04-05 14:25:01Z eckhard
    2831! Use PALM's working precision
    2932! Improved coding style
     
    269272 SUBROUTINE reverse(input_arr)
    270273
     274    INTEGER ::  i
     275    INTEGER ::  lbound_3rd_dimension
     276    INTEGER ::  ubound_3rd_dimension
     277
    271278    REAL(wp), INTENT(INOUT) ::  input_arr(:,:,:)
    272279
    273     input_arr = input_arr(:,:,size(input_arr, 3):1:-1)
     280    lbound_3rd_dimension = LBOUND(input_arr, 3)
     281    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 ))
     286    ENDDO
    274287
    275288 END SUBROUTINE reverse
Note: See TracChangeset for help on using the changeset viewer.