Changeset 4553 for palm/trunk/UTIL/inifor/src/inifor_transform.f90
- Timestamp:
- Jun 3, 2020 4:34:15 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/inifor/src/inifor_transform.f90
r4523 r4553 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Improved code readability and documentation 29 ! 30 ! 31 ! 4523 2020-05-07 15:58:16Z eckhard 28 32 ! bugfix: pressure extrapolation 29 33 ! respect integer working precision (iwp) specified in inifor_defs.f90 … … 1037 1041 k_intermediate = 0 1038 1042 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) 1041 1045 1042 1046 ! … … 1051 1055 !-- current height within it 1052 1056 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) 1055 1059 1056 1060 point_is_above_grid = (current_height > column_top) !22000m, very unlikely … … 1086 1090 k_intermediate = k_intermediate + 1 1087 1091 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) 1090 1094 point_is_in_current_cell = ( & 1091 1095 current_height >= h_bottom .AND. & … … 1127 1131 !> are adressed. While the _interp variant loops over all PALM grid columns 1128 1132 !> given by combinations of all index indices (i,j), this routine loops over a 1129 !> subset of COSMO columns, which are sequ antlially stored in the index lists1133 !> subset of COSMO columns, which are sequentially stored in the index lists 1130 1134 !> iii(:) and jjj(:). 1131 1135 !------------------------------------------------------------------------------! … … 1149 1153 nlev = SIZE(avg_grid%cosmo_h, 3) 1150 1154 1155 ! 1156 !-- For level-based averaging, use the profile of averaged vertical mesoscale 1157 !-- levels computed in init_averaging_grid(). 1151 1158 IF (level_based_averaging) THEN 1152 cosmo_h => avg_grid% h1159 cosmo_h => avg_grid%intermediate_h 1153 1160 ELSE 1154 1161 cosmo_h => avg_grid%cosmo_h … … 1159 1166 DO l = 1, avg_grid%n_columns 1160 1167 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 !-- 1161 1172 IF (level_based_averaging) THEN 1162 1173 i = 1 … … 1171 1182 1172 1183 ! 1173 !-- scan through avg_grid column until and set neighbour indices in1184 !-- Scan through avg_grid column until and set neighbour indices in 1174 1185 !-- case current_height is either below column_base, in the current 1175 1186 !-- cell, or above column_top. Keep increasing current cell index until 1176 1187 !-- the current cell overlaps with the current_height. 1177 k_intermediate = 1 !avg_grid%cosmo_h is inde zed 1-based.1188 k_intermediate = 1 !avg_grid%cosmo_h is indexed 1-based. 1178 1189 DO k_palm = 1, avg_grid%nz 1179 1190
Note: See TracChangeset
for help on using the changeset viewer.