Changeset 138 for palm/trunk/SOURCE/init_3d_model.f90
- Timestamp:
- Nov 28, 2007 10:03:58 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_3d_model.f90
r132 r138 235 235 236 236 ! 237 !-- 3D-arrays for the leaf area density and the canopy drag coefficient 238 IF ( plant_canopy ) THEN 239 ALLOCATE ( lad_s(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 240 lad_u(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 241 lad_v(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 242 lad_w(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 243 cdc(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) ) 244 ENDIF 245 246 ! 237 247 !-- 4D-array for storing the Rif-values at vertical walls 238 248 IF ( topography /= 'flat' ) THEN … … 923 933 'problem' 924 934 CALL local_stop 935 ENDIF 936 937 ! 938 !-- Initialization of the leaf area density 939 IF ( plant_canopy ) THEN 940 941 SELECT CASE ( TRIM( canopy_mode ) ) 942 943 CASE( 'block' ) 944 945 DO i = nxl-1, nxr+1 946 DO j = nys-1, nyn+1 947 lad_s(:,j,i) = lad(:) 948 cdc(:,j,i) = drag_coefficient 949 ENDDO 950 ENDDO 951 952 CASE DEFAULT 953 954 ! 955 !-- The DEFAULT case is reached either if the parameter 956 !-- canopy mode contains a wrong character string or if the 957 !-- user has coded a special case in the user interface. 958 !-- There, the subroutine user_init_plant_canopy checks 959 !-- which of these two conditions applies. 960 CALL user_init_plant_canopy 961 962 END SELECT 963 964 CALL exchange_horiz( lad_s ) 965 CALL exchange_horiz( cdc ) 966 967 DO i = nxl, nxr 968 DO j = nys, nyn 969 DO k = nzb, nzt+1 970 lad_u(k,j,i) = 0.5 * ( lad_s(k,j,i-1) + lad_s(k,j,i) ) 971 lad_v(k,j,i) = 0.5 * ( lad_s(k,j-1,i) + lad_s(k,j,i) ) 972 ENDDO 973 DO k = nzb, nzt 974 lad_w(k,j,i) = 0.5 * ( lad_s(k+1,j,i) + lad_s(k,j,i) ) 975 ENDDO 976 ENDDO 977 ENDDO 978 979 lad_w(nzt+1,:,:) = lad_w(nzt,:,:) 980 981 CALL exchange_horiz( lad_u ) 982 CALL exchange_horiz( lad_v ) 983 CALL exchange_horiz( lad_w ) 984 925 985 ENDIF 926 986
Note: See TracChangeset
for help on using the changeset viewer.