Ignore:
Timestamp:
Aug 16, 2019 1:50:17 PM (22 months ago)
Author:
suehring
Message:

Replace get_topography_top_index functions by pre-calculated arrays in order to save computational resources

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/biometeorology_mod.f90

    r4144 r4168  
    2727! -----------------
    2828! $Id$
     29! Replace function get_topography_top_index by topo_top_ind
     30!
     31! 4144 2019-08-06 09:11:47Z raasch
    2932! relational operators .EQ., .NE., etc. replaced by ==, /=, etc.
    3033!
     
    178181    USE indices,                                                               &
    179182        ONLY:  nxl, nxr, nys, nyn, nzb, nzt, nys, nyn, nxl, nxr, nxlg, nxrg,   &
    180                nysg, nyng
     183               nysg, nyng, topo_top_ind
    181184
    182185    USE kinds  !< Set precision of INTEGER and REAL arrays according to PALM
     
    192195               radiation_interactions, rad_sw_in,                              &
    193196               rad_sw_out, rad_lw_in, rad_lw_out
    194 
    195     USE surface_mod,                                                           &
    196         ONLY:  get_topography_top_index_ji
    197197
    198198    IMPLICIT NONE
     
    15571557             j = mrtbl(iy,l)
    15581558             k = mrtbl(iz,l)
    1559              IF ( k - get_topography_top_index_ji( j, i, 's' ) ==              &
    1560                    bio_cell_level + 1_iwp)  THEN
     1559             IF ( k - topo_top_ind(j,i,0) == bio_cell_level + 1_iwp)  THEN
    15611560!
    15621561!-- Averaging was done before, so we can just copy the result here
     
    15831582          j = mrtbl(iy,l)
    15841583          k = mrtbl(iz,l)
    1585           IF ( k - get_topography_top_index_ji( j, i, 's' ) ==                 &
    1586                 bio_cell_level + 1_iwp)  THEN
     1584          IF ( k - topo_top_ind(j,i,0) == bio_cell_level + 1_iwp)  THEN
    15871585             IF ( mrt_include_sw )  THEN
    15881586                 tmrt_grid(j,i) = ( ( human_absorb * mrtinsw(l) +              &
     
    16081606!------------------------------------------------------------------------------!
    16091607 SUBROUTINE bio_get_thermal_index_input_ij( average_input, i, j, ta, vp, ws,   &
    1610     pair, tmrt )
     1608                                            pair, tmrt )
    16111609
    16121610    IMPLICIT NONE
     
    16331631!-- Determine cell level closest to 1.1m above ground
    16341632!   by making use of truncation due to int cast
    1635     k = INT( get_topography_top_index_ji(j, i, 's') + bio_cell_level )  !< Vertical cell center closest to 1.1m
     1633    k = INT( topo_top_ind(j,i,0) + bio_cell_level )  !< Vertical cell center closest to 1.1m
    16361634
    16371635!
Note: See TracChangeset for help on using the changeset viewer.