Ignore:
Timestamp:
Feb 7, 2019 6:22:49 PM (6 years ago)
Author:
maronga
Message:

bugfixes in palm_csd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/palm_csd_files/palm_csd_tools.py

    r3668 r3726  
    2525# -----------------
    2626# $Id$
     27# Index bound bugfix
     28#
     29# 3668 2019-01-14 12:49:24Z maronga
    2730# Minor changes
    2831#
     
    9093      for l in range(0,len(x)):
    9194         for m in range(0,len(y)):
    92             for k in range(0,len(k_tmp+1)):
     95            for k in range(1,len(k_tmp+1)):
    9396               if k_tmp[k] > array[m,l]:
    94                   array[m,l] = k_tmp[k]-0.5*dz
     97                  array[m,l] = k_tmp[k-1]
    9598                  break
    9699
     
    105108      array_3d = np.ones((len(k_tmp),len(y),len(x)))
    106109     
    107       for l in range(0,len(x)-1):
    108          for m in range(0,len(y)-1):
    109             for k in range(0,len(k_tmp)-1):
     110      for l in range(0,len(x)):
     111         for m in range(0,len(y)):
     112            for k in range(0,len(k_tmp)):
    110113               if k_tmp[k] > array_2d[m,l]:
    111114                  array_3d[k,m,l] = 0
Note: See TracChangeset for help on using the changeset viewer.