Changeset 3613 for palm/trunk/UTIL/inifor/src/inifor_transform.f90
- Timestamp:
- Dec 7, 2018 6:20:37 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/inifor/src/inifor_transform.f90
r3557 r3613 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Use averaged heights profile for level-based averaging instead of modified 29 ! COSMO heights array 30 ! 31 ! 32 ! 3557 2018-11-22 16:01:22Z eckhard 28 33 ! Updated documentation 29 34 ! … … 898 903 !> iii(:) and jjj(:). 899 904 !------------------------------------------------------------------------------! 900 SUBROUTINE find_vertical_neighbours_and_weights_average( avg_grid ) 901 TYPE(grid_definition), INTENT(INOUT) :: avg_grid 902 903 INTEGER :: i, j, k_palm, k_intermediate, l, nlev 904 LOGICAL :: point_is_below_grid, point_is_above_grid, & 905 point_is_in_current_cell 906 REAL(dp) :: current_height, column_base, column_top, h_top, h_bottom, & 907 weight 905 SUBROUTINE find_vertical_neighbours_and_weights_average( & 906 avg_grid, level_based_averaging & 907 ) 908 909 TYPE(grid_definition), INTENT(INOUT), TARGET :: avg_grid 910 LOGICAL :: level_based_averaging 911 912 INTEGER :: i, j, k_palm, k_intermediate, l, nlev 913 LOGICAL :: point_is_below_grid, point_is_above_grid, & 914 point_is_in_current_cell 915 REAL(dp) :: current_height, column_base, column_top, h_top, & 916 h_bottom, weight 917 REAL(dp), POINTER :: cosmo_h(:,:,:) 908 918 909 919 … … 911 921 912 922 nlev = SIZE(avg_grid % cosmo_h, 3) 923 924 IF (level_based_averaging) THEN 925 cosmo_h => avg_grid % h 926 ELSE 927 cosmo_h => avg_grid % cosmo_h 928 END IF 913 929 914 930 ! … … 916 932 DO l = 1, avg_grid % n_columns 917 933 918 i = avg_grid % iii(l) 919 j = avg_grid % jjj(l) 920 921 column_base = avg_grid % cosmo_h(i,j,1) 922 column_top = avg_grid % cosmo_h(i,j,nlev) 934 IF (level_based_averaging) THEN 935 i = 1 936 j = 1 937 ELSE 938 i = avg_grid % iii(l) 939 j = avg_grid % jjj(l) 940 END IF 941 942 column_base = cosmo_h(i,j,1) 943 column_top = cosmo_h(i,j,nlev) 923 944 924 945 ! … … 934 955 !-- current height within it 935 956 current_height = avg_grid % z(k_palm) + avg_grid % z0 936 h_top = avg_grid %cosmo_h(i,j,k_intermediate+1)937 h_bottom = avg_grid %cosmo_h(i,j,k_intermediate)957 h_top = cosmo_h(i,j,k_intermediate+1) 958 h_bottom = cosmo_h(i,j,k_intermediate) 938 959 939 960 ! … … 972 993 k_intermediate = k_intermediate + 1 973 994 974 h_top = avg_grid %cosmo_h(i,j,k_intermediate+1)975 h_bottom = avg_grid %cosmo_h(i,j,k_intermediate)995 h_top = cosmo_h(i,j,k_intermediate+1) 996 h_bottom = cosmo_h(i,j,k_intermediate) 976 997 point_is_in_current_cell = ( & 977 998 current_height >= h_bottom .AND. &
Note: See TracChangeset
for help on using the changeset viewer.