Changeset 4168 for palm/trunk/SOURCE/surface_mod.f90
- Timestamp:
- Aug 16, 2019 1:50:17 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/surface_mod.f90
r4159 r4168 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Remove functions get_topography_top_index. These are now replaced by 29 ! precalculated arrays because of too much CPU-time consumption 30 ! 31 ! 4159 2019-08-15 13:31:35Z suehring 28 32 ! Surface classification revised and adjusted to changes in init_grid 29 33 ! … … 646 650 647 651 PRIVATE 648 652 649 653 INTERFACE init_bc 650 654 MODULE PROCEDURE init_bc … … 698 702 ! 699 703 !-- Public subroutines and functions 700 PUBLIC get_topography_top_index, & 701 get_topography_top_index_ji, & 702 init_bc, & 704 PUBLIC init_bc, & 703 705 init_single_surface_properties, & 704 706 init_surfaces, & … … 710 712 711 713 #if defined( _OPENACC ) 712 PUBLIC enter_surface_arrays, exit_surface_arrays 714 PUBLIC enter_surface_arrays, & 715 exit_surface_arrays 713 716 #endif 714 717 … … 3141 3144 3142 3145 END SUBROUTINE init_single_surface_properties 3143 3144 !------------------------------------------------------------------------------!3145 ! Description:3146 ! ------------3147 !> Determines topography-top index at given (j,i)-position.3148 !------------------------------------------------------------------------------!3149 FUNCTION get_topography_top_index_ji( j, i, grid )3150 3151 IMPLICIT NONE3152 3153 CHARACTER(LEN=*) :: grid !< flag to distinquish between staggered grids3154 INTEGER(iwp) :: i !< grid index in x-dimension3155 INTEGER(iwp) :: ibit !< bit position where topography information is stored on respective grid3156 INTEGER(iwp) :: j !< grid index in y-dimension3157 INTEGER(iwp) :: get_topography_top_index_ji !< topography top index3158 3159 SELECT CASE ( TRIM( grid ) )3160 3161 CASE ( 's' )3162 ibit = 123163 CASE ( 'u' )3164 ibit = 143165 CASE ( 'v' )3166 ibit = 163167 CASE ( 'w' )3168 ibit = 183169 CASE ( 's_out' )3170 ibit = 243171 CASE DEFAULT3172 !3173 !-- Set default to scalar grid3174 ibit = 123175 3176 END SELECT3177 3178 get_topography_top_index_ji = MAXLOC( &3179 MERGE( 1, 0, &3180 BTEST( wall_flags_0(:,j,i), ibit ) &3181 ), DIM = 1 &3182 ) - 13183 3184 RETURN3185 3186 END FUNCTION get_topography_top_index_ji3187 3188 !------------------------------------------------------------------------------!3189 ! Description:3190 ! ------------3191 !> Determines topography-top index at each (j,i)-position.3192 !------------------------------------------------------------------------------!3193 FUNCTION get_topography_top_index( grid )3194 3195 IMPLICIT NONE3196 3197 CHARACTER(LEN=*) :: grid !< flag to distinquish between staggered grids3198 INTEGER(iwp) :: ibit !< bit position where topography information is stored on respective grid3199 INTEGER(iwp), DIMENSION(nys:nyn,nxl:nxr) :: get_topography_top_index !< topography top index3200 3201 SELECT CASE ( TRIM( grid ) )3202 3203 CASE ( 's' )3204 ibit = 123205 CASE ( 'u' )3206 ibit = 143207 CASE ( 'v' )3208 ibit = 163209 CASE ( 'w' )3210 ibit = 183211 CASE ( 's_out' )3212 ibit = 243213 CASE DEFAULT3214 !3215 !-- Set default to scalar grid3216 ibit = 123217 3218 END SELECT3219 3220 get_topography_top_index(nys:nyn,nxl:nxr) = MAXLOC( &3221 MERGE( 1, 0, &3222 BTEST( wall_flags_0(:,nys:nyn,nxl:nxr), ibit )&3223 ), DIM = 1 &3224 ) - 13225 3226 RETURN3227 3228 END FUNCTION get_topography_top_index3229 3146 3230 3147 !------------------------------------------------------------------------------!
Note: See TracChangeset
for help on using the changeset viewer.