Changeset 2333 for palm/trunk/SOURCE
- Timestamp:
- Aug 4, 2017 9:08:26 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r2332 r2333 25 25 ! ----------------- 26 26 ! $Id$ 27 ! minor bugfixes 28 ! 29 ! 2332 2017-08-03 21:15:22Z maronga 27 30 ! bugfix in pavement_pars 28 31 ! … … 1267 1270 ENDDO 1268 1271 1272 ! 1273 !-- Calculate grid spacings. Temperature and moisture are defined at 1274 !-- the center of the soil layers, whereas gradients/fluxes are 1275 !-- defined at the edges (_layer) 1276 ! 1277 !-- Allocate global 1D arrays 1278 ALLOCATE ( ddz_soil_center(nzb_soil:nzt_soil) ) 1279 ALLOCATE ( ddz_soil(nzb_soil:nzt_soil+1) ) 1280 ALLOCATE ( dz_soil_center(nzb_soil:nzt_soil) ) 1281 ALLOCATE ( zs(nzb_soil:nzt_soil+1) ) 1282 1283 zs(nzb_soil) = 0.5_wp * dz_soil(nzb_soil) 1284 zs_layer(nzb_soil) = dz_soil(nzb_soil) 1285 1286 DO k = nzb_soil+1, nzt_soil 1287 zs_layer(k) = zs_layer(k-1) + dz_soil(k) 1288 zs(k) = (zs_layer(k) + zs_layer(k-1)) * 0.5_wp 1289 ENDDO 1290 1291 dz_soil(nzt_soil+1) = zs_layer(nzt_soil) + dz_soil(nzt_soil) 1292 zs(nzt_soil+1) = zs_layer(nzt_soil) + 0.5_wp * dz_soil(nzt_soil) 1293 1294 DO k = nzb_soil, nzt_soil-1 1295 dz_soil_center(k) = zs(k+1) - zs(k) 1296 IF ( dz_soil_center(k) == 0.0_wp ) THEN 1297 message_string = 'invalid soil layer configuration found ' // & 1298 '(dz_soil_center(k) = 0.0)' 1299 CALL message( 'lsm_read_restart_data', 'PA0140', 1, 2, 0, 6, 0 ) 1300 ENDIF 1301 ENDDO 1302 1303 dz_soil_center(nzt_soil) = zs_layer(k-1) + dz_soil(k) - zs(nzt_soil) 1304 1305 ddz_soil_center = 1.0_wp / dz_soil_center 1306 ddz_soil = 1.0_wp / dz_soil 1307 1308 1269 1309 END SUBROUTINE lsm_check_parameters 1270 1310 … … 2106 2146 ENDIF 2107 2147 ENDDO 2108 2109 2110 2111 !2112 !-- Calculate grid spacings. Temperature and moisture are defined at2113 !-- the center of the soil layers, whereas gradients/fluxes are2114 !-- defined at the edges (_layer)2115 zs(nzb_soil) = 0.5_wp * dz_soil(nzb_soil)2116 zs_layer(nzb_soil) = dz_soil(nzb_soil)2117 2118 DO k = nzb_soil+1, nzt_soil2119 zs_layer(k) = zs_layer(k-1) + dz_soil(k)2120 zs(k) = (zs_layer(k) + zs_layer(k-1)) * 0.5_wp2121 2122 ENDDO2123 2124 dz_soil(nzt_soil+1) = zs_layer(nzt_soil) + dz_soil(nzt_soil)2125 zs(nzt_soil+1) = zs_layer(nzt_soil) + 0.5_wp * dz_soil(nzt_soil)2126 2127 DO k = nzb_soil, nzt_soil-12128 dz_soil_center(k) = zs(k+1) - zs(k)2129 2130 IF ( dz_soil_center(k) == 0.0_wp ) THEN2131 message_string = 'invalid soil layer configuration found ' // &2132 '(dz_soil_center(k) = 0.0)'2133 CALL message( 'lsm_read_restart_data', 'PA0140', 1, 2, 0, 6, 0 )2134 ENDIF2135 ENDDO2136 2137 dz_soil_center(nzt_soil) = zs_layer(k-1) + dz_soil(k) - zs(nzt_soil)2138 2139 IF ( myid == 0 ) THEN2140 PRINT*, "zs:", zs2141 PRINT*, "zs_layer:", zs_layer2142 PRINT*, "dz_soil:", dz_soil2143 PRINT*, "dz_soil_center:", dz_soil_center2144 ENDIF2145 2146 2147 ddz_soil_center = 1.0_wp / dz_soil_center2148 ddz_soil = 1.0_wp / dz_soil2149 2150 2151 2152 2153 2154 2155 ! DO k = nzb_soil, nzt_soil-12156 ! dz_soil_center(k) = zs(k+1) - zs(k)2157 !2158 ! IF ( dz_soil_center(k) == 0.0_wp ) THEN2159 ! message_string = 'invalid soil layer configuration found ' // &2160 ! '(dz_soil_center(k) = 0.0)'2161 ! CALL message( 'lsm_read_restart_data', 'PA0140', 1, 2, 0, 6, 0 )2162 ! ENDIF2163 !2164 ! ENDDO2165 !2166 ! dz_soil(nzb_soil) = 2.0_wp * zs(nzb_soil)2167 ! zs_layer(nzb_soil) = 2.0_wp * zs(nzb_soil)2168 !2169 ! DO k = nzb_soil+1, nzt_soil2170 ! dz_soil(k) = ( zs(k) - zs_layer(k-1) ) * 2.0_wp2171 ! zs_layer(k) = zs_layer(k-1) + dz_soil(k)2172 ! ENDDO2173 ! dz_soil(nzt_soil+1) = 0.5_wp * dz_soil(nzt_soil)2174 ! dz_soil_center(nzt_soil) = zs_layer(k-1) + dz_soil(k) - zs(nzt_soil)2175 !2176 !2177 ! ddz_soil_center = 1.0_wp / dz_soil_center2178 ! ddz_soil = 1.0_wp / dz_soil2179 2180 2181 2182 2148 2183 2149 ! … … 2737 2703 INTEGER(iwp) :: l !< index indicating facing of surface array 2738 2704 2739 !2740 !-- Allocate global 1D arrays2741 ALLOCATE ( ddz_soil_center(nzb_soil:nzt_soil) )2742 ALLOCATE ( ddz_soil(nzb_soil:nzt_soil+1) )2743 ALLOCATE ( dz_soil_center(nzb_soil:nzt_soil) )2744 2705 ALLOCATE ( root_extr(nzb_soil:nzt_soil) ) 2745 ALLOCATE ( zs(nzb_soil:nzt_soil+1) )2746 2747 2706 root_extr = 0.0_wp 2748 2707
Note: See TracChangeset
for help on using the changeset viewer.