SUBROUTINE user_init_plant_canopy !------------------------------------------------------------------------------! ! Current revisions: ! ----------------- ! Output of messages replaced by message handling routine. ! ! ! Former revisions: ! ----------------- ! $Id: user_init_plant_canopy.f90 258 2009-03-13 12:36:03Z letzel $ ! ! 211 2008-11-11 04:46:24Z raasch ! Former file user_interface.f90 split into one file per subroutine ! ! Description: ! ------------ ! Initialisation of the leaf area density array (for scalar grid points) and ! the array of the canopy drag coefficient, if the user has not chosen any ! of the default cases !------------------------------------------------------------------------------! USE arrays_3d USE control_parameters USE indices USE user IMPLICIT NONE INTEGER :: i, j ! !-- Here the user-defined grid initializing actions follow: ! !-- Set the 3D-arrays lad_s and cdc for user defined canopies SELECT CASE ( TRIM( canopy_mode ) ) CASE ( 'block' ) ! !-- Not allowed here since this is the standard case used in init_3d_model. CASE ( 'user_defined_canopy_1' ) ! !-- Here the user can define his own topography. !-- The following lines contain an example in that the !-- plant canopy extends only over the second half of the !-- model domain along x ! DO i = nxl-1, nxr+1 ! IF ( i >= INT(nx+1/2) ) THEN ! DO j = nys-1, nyn+1 ! lad_s(:,j,i) = lad(:) ! cdc(:,j,i) = drag_coefficient ! ENDDO ! ELSE ! lad_s(:,:,i) = 0.0 ! cdc(:,:,i) = 0.0 ! ENDIF ! ENDDO !-- After definition, please !-- remove the following three lines! message_string = 'canopy_mode "' // canopy_mode // '" not available yet' CALL message( 'user_init_plant_canopy', 'UI0007', 0, 1, 0, 6, 0 ) CASE DEFAULT ! !-- The DEFAULT case is reached if the parameter canopy_mode contains a !-- wrong character string that is neither recognized in init_3d_model nor !-- here in user_init_plant_canopy. message_string = 'unknown canopy_mode "' // canopy_mode // '"' CALL message( 'user_init_plant_canopy', 'UI0008', 1, 2, 0, 6, 0 ) END SELECT END SUBROUTINE user_init_plant_canopy