Ignore:
Timestamp:
Jun 3, 2020 4:34:15 PM (4 years ago)
Author:
eckhard
Message:

Fixed domain extend check, readablity and documentation improvements

File:
1 edited

Legend:

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

    r4523 r4553  
    2626! -----------------
    2727! $Id$
     28! Improved code readability and documentation
     29!
     30!
     31! 4523 2020-05-07 15:58:16Z eckhard
    2832! bugfix: pressure extrapolation
    2933! respect integer working precision (iwp) specified in inifor_defs.f90
     
    10371041       k_intermediate = 0
    10381042
    1039        column_base = palm_intermediate%h(i,j,0)
    1040        column_top  = palm_intermediate%h(i,j,nlev)
     1043       column_base = palm_intermediate%intermediate_h(i,j,0)
     1044       column_top  = palm_intermediate%intermediate_h(i,j,nlev)
    10411045
    10421046!
     
    10511055!--       current height within it
    10521056          current_height = palm_grid%z(k) + palm_grid%z0
    1053           h_top    = palm_intermediate%h(i,j,k_intermediate+1)
    1054           h_bottom = palm_intermediate%h(i,j,k_intermediate)
     1057          h_top    = palm_intermediate%intermediate_h(i,j,k_intermediate+1)
     1058          h_bottom = palm_intermediate%intermediate_h(i,j,k_intermediate)
    10551059
    10561060          point_is_above_grid = (current_height > column_top) !22000m, very unlikely
     
    10861090                k_intermediate = k_intermediate + 1
    10871091
    1088                 h_top    = palm_intermediate%h(i,j,k_intermediate+1)
    1089                 h_bottom = palm_intermediate%h(i,j,k_intermediate)
     1092                h_top    = palm_intermediate%intermediate_h(i,j,k_intermediate+1)
     1093                h_bottom = palm_intermediate%intermediate_h(i,j,k_intermediate)
    10901094                point_is_in_current_cell = (                                &
    10911095                   current_height >= h_bottom .AND.                         &
     
    11271131!> are adressed. While the _interp variant loops over all PALM grid columns
    11281132!> given by combinations of all index indices (i,j), this routine loops over a
    1129 !> subset of COSMO columns, which are sequantlially stored in the index lists
     1133!> subset of COSMO columns, which are sequentially stored in the index lists
    11301134!> iii(:) and jjj(:).
    11311135!------------------------------------------------------------------------------!
     
    11491153    nlev = SIZE(avg_grid%cosmo_h, 3)
    11501154
     1155!
     1156!-- For level-based averaging, use the profile of averaged vertical mesoscale
     1157!-- levels computed in init_averaging_grid().
    11511158    IF (level_based_averaging)  THEN
    1152        cosmo_h => avg_grid%h
     1159       cosmo_h => avg_grid%intermediate_h
    11531160    ELSE
    11541161       cosmo_h => avg_grid%cosmo_h
     
    11591166    DO  l = 1, avg_grid%n_columns
    11601167
     1168!--    The profile of averaged vertical mesoscale levels stored in
     1169!--    intermediate_h only contains one column. By using the same column -- and
     1170!--    consequently the same vertical interpolation neighbours and weights --
     1171!--   
    11611172       IF (level_based_averaging)  THEN
    11621173          i = 1
     
    11711182
    11721183!
    1173 !--    scan through avg_grid column until and set neighbour indices in
     1184!--    Scan through avg_grid column until and set neighbour indices in
    11741185!--    case current_height is either below column_base, in the current
    11751186!--    cell, or above column_top. Keep increasing current cell index until
    11761187!--    the current cell overlaps with the current_height.
    1177        k_intermediate = 1 !avg_grid%cosmo_h is indezed 1-based.
     1188       k_intermediate = 1 !avg_grid%cosmo_h is indexed 1-based.
    11781189       DO  k_palm = 1, avg_grid%nz
    11791190
Note: See TracChangeset for help on using the changeset viewer.