Ignore:
Timestamp:
Aug 16, 2019 1:50:17 PM (5 years 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/init_3d_model.f90

    r4151 r4168  
    2525! -----------------
    2626! $Id$
     27! Replace function get_topography_top_index by topo_top_ind
     28!
     29! 4151 2019-08-09 08:24:30Z suehring
    2730! Add netcdf directive around input calls (fix for last commit)
    2831!
     
    719722                surf_def_v,                                                    &
    720723                surf_lsm_h,                                                    &
    721                 surf_usm_h,                                                    &
    722                 get_topography_top_index_ji
     724                surf_usm_h
    723725
    724726#if defined( _OPENACC )
     
    16331635          DO  i = nxlg, nxrg
    16341636             DO  j = nysg, nyng
    1635                 nz_u_shift = get_topography_top_index_ji( j, i, 'u' )
    1636                 nz_v_shift = get_topography_top_index_ji( j, i, 'v' )
    1637                 nz_w_shift = get_topography_top_index_ji( j, i, 'w' )
    1638                 nz_s_shift = get_topography_top_index_ji( j, i, 's' )
     1637                nz_u_shift = topo_top_ind(j,i,1)
     1638                nz_v_shift = topo_top_ind(j,i,2)
     1639                nz_w_shift = topo_top_ind(j,i,3)
     1640                nz_s_shift = topo_top_ind(j,i,0)
    16391641
    16401642                u(nz_u_shift:nzt+1,j,i)  = u(0:nzt+1-nz_u_shift,j,i)               
     
    16771679          IF ( complex_terrain )  THEN
    16781680             IF ( nxlg <= 0 .AND. nxrg >= 0 .AND. nysg <= 0 .AND. nyng >= 0 )  THEN
    1679                 nz_u_shift_l = get_topography_top_index_ji( 0, 0, 'u' )
    1680                 nz_v_shift_l = get_topography_top_index_ji( 0, 0, 'v' )
    1681                 nz_w_shift_l = get_topography_top_index_ji( 0, 0, 'w' )
    1682                 nz_s_shift_l = get_topography_top_index_ji( 0, 0, 's' )
     1681                nz_u_shift_l = topo_top_ind(j,i,1)
     1682                nz_v_shift_l = topo_top_ind(j,i,2)
     1683                nz_w_shift_l = topo_top_ind(j,i,3)
     1684                nz_s_shift_l = topo_top_ind(j,i,0)
    16831685             ELSE
    16841686                nz_u_shift_l = 0
Note: See TracChangeset for help on using the changeset viewer.